title: gem install mysql checking for mysql.h... no
body: <p>I'm getting this error on Arch Linux, although mysql.h exists in the system. Does anyone have any idea how to solve this? Here are some vitals:</p>
  
  <pre><code>$ find /usr -name mysql.h
  /usr/include/mysql/mysql.h
  $ echo $PATH
  /home/chris/.rvm/gems/ruby-1.8.7-p302@bogen/bin:/home/chris/.rvm/gems/ruby-1.8.7-p302@global/bin:/home/chris/.rvm/rubies/ruby-1.8.7-p302/bin:/home/chris/.rvm/bin:/bin:/usr/bin:/usr/lib:/sbin:/usr/sbin:/home/chris/bin:/home/chris/lib:/usr/share/eclipse:/opt/kde/bin:/usr/bin/perlbin/site:/usr/bin/perlbin/vendor:/usr/bin/perlbin/core:/opt/qt/bin:/usr/include:/usr/local/include:/opt/ruby1.8/bin:/usr/local/bin:/usr/local/sbin:/usr/bin/vendor_perl:/usr/bin/core_perl
  </code></pre>
  
  <p>Here's the exact output of <code>gem install mysql</code></p>
  
  <pre><code>$ which ruby
  /home/chris/.rvm/rubies/ruby-1.8.7-p302/bin/ruby
  $ gem install mysql
      Building native extensions.  This could take a while...
      ERROR:  Error installing mysql:
      ERROR: Failed to build gem native extension.
  
      /home/chris/.rvm/rubies/ruby-1.8.7-p302/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
  *** 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.
  
  Provided configuration options:
      --with-opt-dir
      --without-opt-dir
      --with-opt-include
      --without-opt-include=${opt-dir}/include
      --with-opt-lib
      --without-opt-lib=${opt-dir}/lib
      --with-make-prog
      --without-make-prog
      --srcdir=.
      --curdir
      --ruby=/home/chris/.rvm/rubies/ruby-1.8.7-p302/bin/ruby
      --with-mysql-config
      --without-mysql-config
  
  
  Gem files will remain installed in /home/chris/.rvm/gems/ruby-1.8.7-p302@bogen/gems/mysql-2.8.1 for inspection.
  Results logged to /home/chris/.rvm/gems/ruby-1.8.7-p302@bogen/gems/mysql-2.8.1/ext/mysql_api/gem_make.out
  </code></pre>
  
  <p>As this is Arch linux, there are no devel packages like in Ubuntu or CentOS. Variations of the above command that I've tried include:</p>
  
  <pre><code>gem install mysql -- --with-mysql-include=/usr/include/mysql --with-mysql-config
  gem install mysql -- --with-mysql-include=/usr/include/mysql
  gem install mysql -- --with-mysql-include=/usr/include
  </code></pre>
  
  <p>all to no avail. Unfortunately, every other report of this error that I've been able to find either have to do with Mac OS or lack of devel package on other linux distros. Since the header file is there in my situation and seems to be in a standard place, I'm not sure what to try next. Any hints would be much appreciated.</p>