Mysql gem problem

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

···

--
Posted via http://www.ruby-forum.com/.

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

···

On Fri, Apr 23, 2010 at 5:07 PM, Henry Oss <oss.hcs@googlemail.com> wrote:

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

Jonathan Nielsen wrote:

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.

···

--
Posted via http://www.ruby-forum.com/\.