![](/img/trans.png)
[英]Bundle Install wont install mysql2 gem with Ruby 1.9.3, Rails3 and Mac Mountain Lion
[英]Rails error when trying to install mysql client gem on Mac OSX Lion
我已经通过MAMP安装了mysql服务器。
但是,当尝试安装mysql Rails客户端(gem安装mysql2)时,出现以下错误:
ERROR: Failed to build gem native extension. /Users/krisgandhi/.rvm/rubies/ruby-1.9.3-p194/bin/ruby extconf.rb checking for mysql_query() in -lmysqlclient... no checking for main() in -lm... yes checking for mysql_query() in -lmysqlclient... no checking for main() in -lz... yes checking for mysql_query() in -lmysqlclient... no checking for main() in -lsocket... no checking for mysql_query() in -lmysqlclient... no checking for main() in -lnsl... no checking for mysql_query() in -lmysqlclient... no checking for main() in -lmygcc... no checking for mysql_query() in -lmysqlclient... no *** 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.
我认为您应该从MAMP中删除mysql。 并尝试:
brew install mysql
或者从这里安装,找到合适的dmg:
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.