开发者

Can't run install MySQL gem Fedora 14, even after installing mysql-devel, ruby-devel, and rubygems

开发者 https://www.devze.com 2023-02-16 01:57 出处:网络
I\'m trying to install the mysql gem via sudo gem install mysql --version 2.7 However, I get the following error:

I'm trying to install the mysql gem via

sudo gem install mysql --version 2.7

However, I get the following error:

Building native extensions.  This could take a while...
...........
ERROR:  Error installing mysql:
    ERROR: Failed to build gem native extension.

/usr/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 m开发者_C百科ysql_query() in -lmysqlclient... no
checking for main() in -lnsl... yes
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.

Any ideas?


somethings to try:

gem install mysql -- --with-mysql-config=/usr/local/mysql/bin/mysql_config

of course use path of where your mysql_config is. mysql_config will be there if you've installed a mysql client

gem install mysql -- \
--with-mysql-include=/usr/include/mysql \
--with-mysql-lib=/usr/lib/mysql

use paths of where your lib and headers are for mysql.

0

精彩评论

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