gpt4 book ai didi

ruby-on-rails - 无法构建 gem native 扩展 (mkmf (LoadError)) - Ubuntu 12.04

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

<分区>

嘿,我正在尝试在一台新的 ubuntu 机器上安装 rails。我安装了 ruby​​ 和 rvm,但出现“无法构建 gem native 扩展”错误。这是什么意思?

$ sudo gem install rails -v 3.2.9

(没有 sudo 表示我没有权限)

然后它会输出很多“获取”命令,最终会出现这个错误:

    Building native extensions.  This could take a while...
ERROR: Error installing rails:
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:1:in `<main>'


Gem files will remain installed in /var/lib/gems/1.9.1/gems/json-1.8.0 for inspection.
Results logged to /var/lib/gems/1.9.1/gems/json-1.8.0/ext/json/ext/generator/gem_make.out

当我打字时

$rails server

它说当前没有安装 rails

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