[サイトマップ] | TOP > FAQ > インストール/システム運用 > gem install mysqlが失敗する

gem install mysqlが失敗する

[広告] Redmineホスティングサービス My Redmine
メール添付でのファイルのやりとりから脱却して情報共有のストレスを無くしましょう。


Redhat Enterprise Linux / CentOSで@gem install mysql@を実行すると以下のようなエラーで失敗することがあります。

# gem install mysql
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 install mysql
checking for mysql_query() in -lmysqlclient... no
checking for main() in -lm... yes
checking for mysql_query() in -lmysqlclient... no
checking for main() in -lz... yes
checking for mysql_query() in -lmysqlclient... no
checking for main() in -lsocket... no
checking for mysql_query() in -lmysqlclient... no
checking for main() in -lnsl... yes
checking for mysql_query() in -lmysqlclient... 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.

MySQLのクライアントライブラリの検索に失敗していますので、ライブラリがあるディレクトリを次のように明示的に指定して実行してみてください。

# gem install mysql -- --with-mysql-lib=/usr/lib/mysql


Redmine.JP TOP > FAQ > インストール/システム運用 > gem install mysqlが失敗する
(初版: 2009/04/06 最終更新: 2009/04/06)
Redmineホスティングサービス My Redmine
Subversionホスティングサービス My Redmine