Quantcast
Viewing all articles
Browse latest Browse all 9

Installing MySQL gem on CentOS

Old news, but you’d be surprised how many times the same:

Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers.
...

error brings everything to a halt. Well on Centos the way to install the MySQL gem is:

$ sudo yum install mysql mysql-devel gcc
...
 
# 32 bit machine
$ sudo gem install mysql -- \
> --with-mysql-include=/usr/bin/mysql \
> --with-mysql-lib=/usr/lib/mysql
 
# or 64 bit like they are on SliceHost
$ sudo gem install mysql -- \
> --with-mysql-include=/usr/bin/mysql \
> --with-mysql-lib=/usr/lib64/mysq
 
Building native extensions.  This could take a while...
Successfully installed mysql-2.7
1 gem installed
...

Viewing all articles
Browse latest Browse all 9

Trending Articles