# MySQL Gem - x86\_64-linux

**URL:** <https://www.ruby-forum.com/t/mysql-gem-x86-64-linux/89976>\
**Category:** Rails\
**Created:** [March 24, 2007, 1:31pm UTC](https://www.ruby-forum.com/t/mysql-gem-x86-64-linux/89976 "2007-03-24T13:31:35Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![al-evans](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/54ee81/32.png) [@al-evans](https://www.ruby-forum.com/u/al-evans)\
**Post date:** [March 24, 2007, 1:31pm UTC](https://www.ruby-forum.com/t/mysql-gem-x86-64-linux/89976/1 "2007-03-24T13:31:35Z")

</div>

Can somebody tell me how to get the MySQL Gem to build its native  
extensions under x86\_64 linux?

I say:  
gem install mysql – -with-mysql-dir=/usr/lib64/mysql

I get:

checking for mysql\_query() in -lmysqlclient… no  
checking for main() in -lm… yes  
[…]  
\*\*\* 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.

–Al Evans

---

<div class="post-metadata">

**Author:** ![al-evans](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/54ee81/32.png) [@al-evans](https://www.ruby-forum.com/u/al-evans)\
**Post date:** [March 24, 2007, 4:04pm UTC](https://www.ruby-forum.com/t/mysql-gem-x86-64-linux/89976/2 "2007-03-24T16:04:44Z")

</div>

Al Evans wrote:

> Can somebody tell me how to get the MySQL Gem to build its native  
> extensions under x86\_64 linux?
> 
> I say:  
> gem install mysql – -with-mysql-dir=/usr/lib64/mysql
> 
> I get:
> 
> checking for mysql\_query() in -lmysqlclient… no  
> checking for main() in -lm… yes  
> […]  
> \*\*\* 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.

Urk, never mind. The right thing to do was apparently

gem install mysql – -with-mysql-config=/usr/bin/mysql-config

(Though I actually did this in the install directory via setup.rb.)

–Al Evans
