无法在Debian上安装mysql2 gem

时间:2014-03-06 16:05:18

标签: ruby-on-rails

尝试安装gem mysql2,我无法让它工作。在尝试安装之前,我安装了以下

sudo apt-get install mysql-client libmysqlclient-dev

然后我去安装mysql2并获取

sudo gem install mysql2 

这是我得到的错误。感谢

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

    /usr/bin/ruby1.9.1 extconf.rb
/usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require': cannot load such file --      mkmf (LoadError)
from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from extconf.rb:2:in `<main>'

1 个答案:

答案 0 :(得分:0)

你需要ruby-dev

sudo aptitude install ruby1.9.1-dev

应该修复它。