加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

无法在ruby 2.2.1中安装json 1.8.3

发布时间:2020-12-17 04:20:48 所属栏目:百科 来源:网络整理
导读:我在 Ruby 2.2.1p85(2015-02-26修订版49769)[x86_64-linux](安装rvm 1.25.33)和bundler 1.10.6中运行bundle install 当它尝试安装json 1.8.3时,我得到以下内容: Installing json 1.8.3 with native extensionsGem::Ext::BuildError: ERROR: Failed to build
我在 Ruby 2.2.1p85(2015-02-26修订版49769)[x86_64-linux](安装rvm 1.25.33)和bundler 1.10.6中运行bundle install

当它尝试安装json 1.8.3时,我得到以下内容:

Installing json 1.8.3 with native extensions

Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

/home/andrew/.rvm/rubies/ruby-2.2.1/bin/ruby -r ./siteconf20150905-31357-cgs3dn.rb extconf.rb
creating Makefile

make "DESTDIR=" clean

make "DESTDIR="
compiling generator.c
linking shared-object json/ext/generator.so

make "DESTDIR=" install
./install -m 0755 generator.so ./.gem.20150905-31357-199esvy/json/ext
make: ./install: Command not found
make: *** [install-so] Error 127

make install failed,exit code 2

在同一台主机上,我可以在ruby 2.1.3中安装json 1.8.3.

在another SO question中,我看到了确保安装可用的建议.当我安装–help时,我得到有效的输出.

我该怎么办?为什么gem能够安装在2.1.3而不是2.2.1中?

解决方法

简单修复删除你的gem.lock文件并运行bundle install这应该重建gemlock文件并解决问题,我在尝试将我的开发环境从nitrous.io移动到cloud9时遇到了同样的错误.希望这个帮助

从migs120的答案https://github.com/flori/json/issues/253复制

我使用macOS sierra,它的工作正常.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读