Nick Karnik
Nick Karnik
Author

Computer Scientist | Hacker | Entrepreneur | Ex-Microsoft | YC

Share


Twitter


Installing MySQL Extensions for Ruby

When I tried ‘gem install mysql’, I got the following error:ruby extconf.rb install mysql checking for mysql_query() in -lmysqlclient… no checking for main() in…

Nick KarnikNick Karnik

When I tried ‘gem install mysql’, I got the following error:ruby extconf.rb install mysql
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

Here is the command I used to fix it:
‘gem install mysql — –with-include=/usr/include/mysql –with-mysql-lib=/usr/lib/mysql –with-mysql-config’