sudo gem install mysql Building native extensions. This could take a while... ERROR: Error installing mysql: ERROR: Failed to build gem native extension.
/opt/ruby-enterprise-1.8.7-2012.02/bin/ruby 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... 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 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.
Gem files will remain installed in /opt/ruby-enterprise-1.8.7-2012.02/lib/ruby/gems/1.8/gems/mysql-2.8.1 for inspection. Results logged to /opt/ruby-enterprise-1.8.7-2012.02/lib/ruby/gems/1.8/gems/mysql-2.8.1/ext/mysql_api/gem_make.out
MySQL 5.0: sudo apt-get install libmysqlclient15-dev
MySQL 4.x: sudo apt-get install libmysqlclient12-dev