piątek, 10 czerwca 2011

Ruby: installing mysql2 gem on Ubuntu 11.04

I have just faced problem with the installation of the mysql2 gem on my newly installed ubuntu 11.04 natty box.

Fortunately I was abel to solve it by installing the following additional packages:
  • libmysqlclient-dev
  • libmysql-ruby1.9
  • ruby1.9.1-dev
Afterwards the installation/compilation of native code went through fine - although there is some error reported during installation of rdoc but it does not affect the library itself (only the documentation might be corrupted - seems to be a bug). Below the list of commands invoked in my environment:

root@krystianekb:/var/log# apt-get install libmysqlclient-dev
Reading package lists... Done
Building dependency tree      
Reading state information... Done
The following NEW packages will be installed:
  libmysqlclient-dev
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 3,174 kB of archives.
After this operation, 9,839 kB of additional disk space will be used.
Get:1 http://pl.archive.ubuntu.com/ubuntu/ natty/main libmysqlclient-dev amd64 5.1.54-1ubuntu4 [3,174 kB]
Fetched 3,174 kB in 12s (256 kB/s)                                            
Selecting previously deselected package libmysqlclient-dev.
(Reading database ... 147843 files and directories currently installed.)
Unpacking libmysqlclient-dev (from .../libmysqlclient-dev_5.1.54-1ubuntu4_amd64.deb) ...
Processing triggers for man-db ...
Setting up libmysqlclient-dev (5.1.54-1ubuntu4) ...

root@krystianekb:/var/log# apt-get install libmysql-ruby1.9 ruby1.9.1-dev
Reading package lists... Done
Building dependency tree      
Reading state information... Done
Note, selecting 'libmysql-ruby1.9.1' for regex 'libmysql-ruby1.9'
The following NEW packages will be installed:
  libmysql-ruby1.9.1 ruby1.9.1-dev
0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
Need to get 1,222 kB of archives.
After this operation, 4,071 kB of additional disk space will be used.
Get:1 http://pl.archive.ubuntu.com/ubuntu/ natty/universe libmysql-ruby1.9.1 amd64 2.8.2-1 [55.8 kB]
Get:2 http://pl.archive.ubuntu.com/ubuntu/ natty/universe ruby1.9.1-dev amd64 1.9.2.0-2 [1,166 kB]
Fetched 1,222 kB in 4s (249 kB/s)         
Selecting previously deselected package libmysql-ruby1.9.1.
(Reading database ... 147898 files and directories currently installed.)
Unpacking libmysql-ruby1.9.1 (from .../libmysql-ruby1.9.1_2.8.2-1_amd64.deb) ...
Selecting previously deselected package ruby1.9.1-dev.
Unpacking ruby1.9.1-dev (from .../ruby1.9.1-dev_1.9.2.0-2_amd64.deb) ...
Setting up libmysql-ruby1.9.1 (2.8.2-1) ...
Setting up ruby1.9.1-dev (1.9.2.0-2) ...
 

root@krystianekb:/var/log# gem1.9.1 install mysql2 
Building native extensions.  This could take a while...
Successfully installed mysql2-0.3.2
1 gem installed
Installing ri documentation for mysql2-0.3.2...
Enclosing class/module 'mMysql2' for class Client not known
Installing RDoc documentation for mysql2-0.3.2...
Enclosing class/module 'mMysql2' for class Client not known
root@krystianekb:/var/log#

Brak komentarzy:

Prześlij komentarz