# Gem install mysql \*\*\*extconf.rb failed\*\*\*

**URL:** <https://www.ruby-forum.com/t/gem-install-mysql-extconf-rb-failed/97466>\
**Category:** Rails\
**Created:** [July 7, 2006, 8:31am UTC](https://www.ruby-forum.com/t/gem-install-mysql-extconf-rb-failed/97466 "2006-07-07T08:31:21Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jmvbxx](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/ed655f/32.png) [@jmvbxx](https://www.ruby-forum.com/u/jmvbxx)\
**Post date:** [July 7, 2006, 8:31am UTC](https://www.ruby-forum.com/t/gem-install-mysql-extconf-rb-failed/97466/1 "2006-07-07T08:31:21Z")

</div>

I’ve installed rails (and it works) and now I want to be able to connect  
to a mysql database.

The database.yml file tells me to install the mysql drivers by typing:

gem install mysql

This is the error I receive:

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.

Any help is greatly appreciated! Thank you!  
jmvbxx is online now Edit/Delete Message

---

<div class="post-metadata">

**Author:** ![jmvbxx](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/ed655f/32.png) [@jmvbxx](https://www.ruby-forum.com/u/jmvbxx)\
**Post date:** [July 7, 2006, 9:47pm UTC](https://www.ruby-forum.com/t/gem-install-mysql-extconf-rb-failed/97466/2 "2006-07-07T21:47:09Z")

</div>

## What platform is this on?

Peter Wright  
removed\_email\_address@domain.invalid

Personal Blog → [http://peterwright.blogspot.com](http://peterwright.blogspot.com)  
Agile Development Blog → [http://exceeding-expectations.blogspot.com](http://exceeding-expectations.blogspot.com)

---

<div class="post-metadata">

**Author:** ![jmvbxx](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/ed655f/32.png) [@jmvbxx](https://www.ruby-forum.com/u/jmvbxx)\
**Post date:** [July 7, 2006, 9:53pm UTC](https://www.ruby-forum.com/t/gem-install-mysql-extconf-rb-failed/97466/3 "2006-07-07T21:53:53Z")

</div>

Try this:

sudo gem install mysql – --with-mysql-config

I had the same problem and it worked for m.

Thank You,  
Ben J.  
E: removed\_email\_address@domain.invalid
