ITeye博客

gem安装mysql2 出现编译问题

夜鸣猪 · 2012-05-21 21:44 · Ruby On Rails · 编程语言 · Markdown

sudo apt-get install libmysql-ruby libmysqlclient-dev

Installing mysql2 (0.3.11) with native extensions Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.

    /home/livegamer/.rvm/rubies/ruby-1.9.3-p125/bin/ruby extconf.rb 

checking for rb_thread_blocking_region()... yes checking for rb_wait_for_single_fd()... yes 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... yes 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.

ubuntu 下要确认


sudo aptitude install mysql-server-5.5 mysql-client-5.5



sudo aptitude install libmysqlclient-dev

评论(0)

暂无评论。

评论功能维护中,当前仅展示历史评论。