所以我知道这个问题之前已经被问过,并且我已经查看了之前的所有答案,但仍然找不到解决方案。希望大家能帮忙。
设置:我正在运行 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
不幸的是,结果相同。
关于从这里去哪里的任何想法?
谢谢!
凯文