gpt4 book ai didi

ruby-on-rails - Rails 安装在 Ubuntu 上失败,错误为 "cannot load such file -- mkmf"

转载 作者:数据小太阳 更新时间:2023-10-29 06:21:21 25 4
gpt4 key购买 nike

我在 Ubuntu 11 上安装 Rails 时遇到了这个问题:

root@salah:/home/salah/rubygems-1.8.15# sudo gem install mysql

Fetching: mysql-2.8.1.gem (100%)
Building native extensions. This could take a while...
ERROR: Error installing mysql:
ERROR: Failed to build gem native extension.

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


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

最佳答案

如果我没记错的话,mkmf 是 ruby​​-dev 包的一部分。尝试:

sudo aptitude install ruby1.9.1-dev

当然你最好通过 RVM 安装 ruby​​ :)

关于ruby-on-rails - Rails 安装在 Ubuntu 上失败,错误为 "cannot load such file -- mkmf",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12731904/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com