mysql gem problem

H

Henry Oss

Hi

I am a ruby and linux newbie hoping to learn rails. I have Ubuntu 9.10
(64 bit), ruby 1.8.7, MySQL 5.1.37, which appear sto be working in that
I can run the Administrator app OK.

When running:
$ sudo gem install mysql

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

/usr/bin/ruby1.8 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... no
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.

Most advice seems to centre around locating your mysql_config file, but
$ sudo find / -name "mysql_config" -print
is drawing a blank.

Can anybody save my head from this brick wall?

Thanks in advance
 
J

Jonathan Nielsen

Hi

I am a ruby and linux newbie hoping to learn rails. =C2=A0I have Ubuntu 9= 10
(64 bit), ruby 1.8.7, MySQL 5.1.37, which appear sto be working in that
I can run the Administrator app OK.

When running:
$ sudo gem install mysql

I get the following:
Building native extensions. =C2=A0This could take a while...
ERROR: =C2=A0Error installing mysql:
=C2=A0ERROR: Failed to build gem native extension.

/usr/bin/ruby1.8 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... no
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. =C2=A0Check the mkmf.log file for mor= e
details. =C2=A0You may need configuration options.

Most advice seems to centre around locating your mysql_config file, but
$ sudo find / -name "mysql_config" -print
is drawing a blank.

Can anybody save my head from this brick wall?

Thanks in advance


Hi, looks like you need the libmysqlclient-dev package from the Ubuntu
repositories. You may also need the ruby-dev package.

See if that works for you!

-Jonathan Nielsen
 
H

Henry Oss

Jonathan said:
Hi, looks like you need the libmysqlclient-dev package from the Ubuntu
repositories. You may also need the ruby-dev package.

See if that works for you!

-Jonathan Nielsen

That is it solved - thanks. I had the ruby-dev, but not the longer one.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,901
Latest member
Noble71S45

Latest Threads

Top