# Mysql gem installation

**URL:** <https://www.ruby-forum.com/t/mysql-gem-installation/101772>\
**Category:** Ruby\
**Created:** [August 7, 2006, 9:46pm UTC](https://www.ruby-forum.com/t/mysql-gem-installation/101772 "2006-08-07T21:46:11Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![wickie](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/w/ba9def/32.png) [@wickie](https://www.ruby-forum.com/u/wickie)\
**Post date:** [August 7, 2006, 9:46pm UTC](https://www.ruby-forum.com/t/mysql-gem-installation/101772/1 "2006-08-07T21:46:11Z")

</div>

Thanking everyone for all the help I’ve been given to this point, I’m  
trying to get the mysql interface for ruby installed. I first tried  
using the distribution (Ubuntu breezy) apt-get to install the  
libmysql-ruby. It installs, but ruby doesn’t recognize it (I’ve done a  
compile of 1.8.5 and installed that, after some help from the people  
here).

I then tried  
sudo gem install mysql

It asks me which version I want installed, I picked 2.7 (ruby). gem runs  
for a bit, then gives me the following error:

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.

* * *

If I’m reading mkmf.log correctly, the problem is in finding  
mysqlclient.

Does anyone know how to address this one? Also, are there any other gems  
that I should install to have a good, working ruby installation?

Again, thanks for the help to this point…

—Michael

---

<div class="post-metadata">

**Author:** ![wickie](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/w/ba9def/32.png) [@wickie](https://www.ruby-forum.com/u/wickie)\
**Post date:** [August 8, 2006, 1:19am UTC](https://www.ruby-forum.com/t/mysql-gem-installation/101772/2 "2006-08-08T01:19:29Z")

</div>

On 8/7/06, Michael S. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> * * *
> 
> If I’m reading mkmf.log correctly, the problem is in finding  
> mysqlclient.
> 
> Does anyone know how to address this one? Also, are there any other gems  
> that I should install to have a good, working ruby installation?

It should be complaining about one or more specific files, and these  
should probably be either header (.h), or libraries (.so) files.

Once you know what file(s) you are looking for, the next trick is to  
figure out which ubuntu/debian package(s) include(s) that/those files.  
Sometimes it’s fairly obvious. One hint is that if it’s a header  
file the package name is likely to have dev (for development).

A tool, which might be useful, is apt-file which comes in a package of  
that name. If you install that package you can issue the command:

apt-file search xxx.h

where xxx.h is the name of a file you are looking for. It’ will  
search the same repositories that apt-get (and synaptic or aptitude or  
…) does for files in packages without needing the packages to be  
installed.

Before it works though you need to load its cache by doing the command

apt-file update

–  
Rick DeNatale

IPMS/USA Region 12 Coordinator  
[http://ipmsr12.denhaven2.com/](http://ipmsr12.denhaven2.com/)

Visit the Project Mercury Wiki Site  
[http://www.mercuryspacecraft.com/](http://www.mercuryspacecraft.com/)
