あーかいぶすハイディフィニション

ここはもう更新しとらんのじゃ

久しぶりにgem Install mysql

Gem から mysql インストールしようとしてたんだけど、なぜかうまくいかない。

こうすると
# yum install mysql*.x86_64
# gem install mysql -v=2.7 -- --with-mysql-config=/usr/bin/mysql_config 
こうなる
[root@HOSTNAME ~]# gem install mysql -- --with-mysql-config=/usr/bin/mysql_config
Building native extensions.  This could take a while...
ERROR:  Error installing mysql:
        ERROR: Failed to build gem native extension.

/usr/local//bin/ruby extconf.rb --with-mysql-config=/usr/bin/mysql_config
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=/usr/local//bin/ruby
        --with-mysql-config


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

SELINUX 無効にしたりしてたんだけど、途中で原因にようやく気づいた。

# yum install mysql-devel.i386

どうも、64bit 版ディストリビュージョンを利用していても mysql-devel パッケージの i386 版を入れないとダメのよう。
なんの為のアーキテクチャ指定なんだ……。