Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I'm installing mysql gem on Amazon AMI 2010.11.1 and I'm having the next problem:

# gem install  mysql
Building native extensions.  This could take a while...
ERROR:  Error installing mysql:
        ERROR: Failed to build gem native extension.

/usr/bin/ruby extconf.rb
checking for mysql_ssl_set()... no
checking for rb_str_set_len()... no
checking for rb_thread_start_timer()... no
checking for mysql.h... no
checking for mysql/mysql.h... no


Gem files will remain installed in /usr/lib/ruby/gems/1.8/gems/mysql-2.8.1 for inspection.
Results logged to /usr/lib/ruby/gems/1.8/gems/mysql-2.8.1/ext/mysql_api/gem_make.out

I think that I have all the needed libs

# rpm -qa mysql*
mysql-libs-5.1.47-1.2.amzn1.i386
mysql-devel-5.1.47-1.2.amzn1.i386
mysql-5.1.47-1.2.amzn1.i386

# rpm -qa ruby*
ruby-irb-1.8.7.302-1.2.amzn1.noarch
ruby-libs-1.8.7.302-1.2.amzn1.i686
ruby-1.8.7.302-1.2.amzn1.i686
ruby-devel-1.8.7.302-1.2.amzn1.i686
ruby-rdoc-1.8.7.302-1.2.amzn1.noarch

Any hints?

share|improve this question

2 Answers 2

up vote 2 down vote accepted

The setup was missing gcc.

share|improve this answer

Have you already run "gem update" and "gem upgrade" first? What OS are you using?

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.