Ruby gem install mysql 错误解决

利用gem安装mysql时的错误:

 

[root@company ruby]# 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
mkmf.rb can't find header files for ruby at /usr/lib/ruby/ruby.h


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

解决方法:

 

 yum install ruby-devel

posted @ 2012-11-29 20:01 Linux、Mongo、Php、Shell、Python、C 阅读(...) 评论(...) 编辑 收藏