今天由于升级 rvm,把原来的环境删除掉了,重新安装一套。 结果死活没装上 mysql 这个 gem 操作系统是 Mac OS X Lion
env ARCHFLAGS="-arch x86_64" gem install mysql -v 2.8.1 -- -with-mysql-dir=/usr/local/Cellar/mysql/5.1.49 -with-mysql-lib=/usr/local/Cellar/mysql/5.1.49/lib -with-mysql-include=/usr/local/Cellar/mysql/5.1.49/include -with-mysql-config=/usr/local/Cellar/mysql/5.1.49/bin/mysql_config
checking for mysql_query() in -lmysqlclient... yes
checking for mysql_ssl_set()... yes
checking for rb_str_set_len()... yes
checking for rb_thread_start_timer()... yes
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.
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/rain/.rvm/rubies/ree-1.8.7-2012.02/bin/ruby
--with-mysql-config
--without-mysql-config
--with-mysql-dir
--without-mysql-dir
--with-mysql-include
--without-mysql-include=${mysql-dir}/include
--with-mysql-lib
--without-mysql-lib=${mysql-dir}/lib
--with-mysqlclientlib
--without-mysqlclientlib
我都快给 mysql gem 跪了,每次安装都会有问题。
错误信息里提示找不到 mysql.h 文件,但是这个文件明明是有的
checking for mysql.h... no
checking for mysql/mysql.h... no
/usr/local/Cellar/mysql/5.1.49/include/mysql/mysql.h