开发者

Gem installation ERROR: Failed to build gem native extension

开发者 https://www.devze.com 2023-01-19 08:52 出处:网络
I have latest Xcode Tools 3.2.4 installed. Just whenever I try to install any gem, for example, the MySQL gem, such error occurs:

I have latest Xcode Tools 3.2.4 installed. Just whenever I try to install any gem, for example, the MySQL gem, such error occurs:

VNMB:rails2app ABC$ sudo env ARCHFLAGS="-arch i386" gem install mysql -- \

--with-mysql-dir=/usr/local/mysql --with-mysql-lib=/usr/local/mysql/lib \ --with-mysql-include=/usr/local/mysql/include Password: Building native extensions. This could take a while... ERROR: Error installing mysql: ERROR: Failed to build gem native extension.

/Users/ABC/.rvm/rubies/ruby-1.8.7-p302/bin/ruby extconf.rb --with-mysql-dir=/usr/local/mysql --with-mysql-lib=/usr/local/mysql/lib --with-mysql-include=/usr/local/mysql/include 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 che开发者_开发问答cking for main() in -lmygcc... yes checking for mysql_query() in -lmysqlclient... no

Gem files will remain installed in /Users/ABC/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/gems/1.8/gems/mysql-2.8.1 for inspection. Results logged to /Users/ABC/.rvm/gems/ruby-1.8.7-p302/gems/mysql-2.8.1/ext/mysql_api/gem_make.out


Try installing mysql from the macports/homebrew.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号