MySQL Ruby Gem安装问题
作者:互联网
所以我知道之前已经问过这个问题,我已经查看了之前的所有答案,但仍然无法找到解决方案.希望你们都能提供帮助.
设置:我正在运行Mac OS X 10.6服务器.我已经在Web应用程序上使用了内置的MySQL安装,它运行良好.现在我正在尝试运行需要MySQL的RoR应用程序.
所以,每当我进入
gem install mysql
它吐出以下错误:
Building native extensions. This could take a while...
ERROR: Error installing mysql:
ERROR: Failed to build gem native extension.
/Users/admin/.rvm/rubies/ruby-1.9.2-p180/bin/ruby extconf.rb --with-mysql-config=/var/mysql
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers. Check the mkmf.log file for more
details. You may need configuration options.
Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/Users/admin/.rvm/rubies/ruby-1.9.2-p180/bin/ruby
--with-mysql-config
extconf.rb:35:in ``': Permission denied - /var/mysql --cflags (Errno::EACCES)
from extconf.rb:35:in `<main>'
Gem files will remain installed in /Users/admin/.rvm/gems/ruby-1.9.2-p180@rails3/gems/mysql-2.8.1 for inspection.
Results logged to /Users/admin/.rvm/gems/ruby-1.9.2-p180@rails3/gems/mysql- 2.8.1/ext/mysql_api/gem_make.out
因此,通过我的研究,我试图明确说明MySQL安装的位置.
gem install mysql -- --with-mysql-config=/var/mysql
不幸的是,结果相同.
从这里开始的任何想法?
谢谢!
凯文
解决方法:
凯文,
本文可以帮助您解决您的问题:
http://rapd.wordpress.com/2007/05/17/battle-against-ror-gem-install-mysql/
标签:osx-server,ruby-on-rails,mysql,macos,ruby-on-rails-3 来源: https://codeday.me/bug/20190827/1736401.html