【发布时间】:2011-03-07 17:32:28
【问题描述】:
我收到此错误:
构建原生扩展。这可能需要一段时间...
ERROR: Error installing mysql:
ERROR: Failed to build gem native extension.
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby extconf.rb --with-mysql-config=/Applications/MAMP/Library/bin/mysql_config
checking for mysql_ssl_set()... no
checking for rb_str_set_len()... no
checking for rb_thread_start_timer()... no
checking for mysql.h... no
checking for mysql/mysql.h... 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.
我已经尝试了所有here,但我仍然收到错误消息。出于某种原因,当我运行locate mysql_config 时,这是我得到的结果:
/Applications/MAMP/Library/bin/mysql_config
/Applications/MAMP/Library/share/man/man1/mysql_config.1
我尝试使用每个路径运行sudo gem install mysql2 -- –with-mysql config=/path/you/identified/above/mysql_config 两次,但我仍然从上面得到错误。我下载了新版本的 MySql 并且我有 Xcode,但我仍然收到这些错误。我做错了什么?
【问题讨论】:
标签: mysql ruby-on-rails ruby database installation