【发布时间】:2018-07-11 22:55:33
【问题描述】:
安装 json (1.8.6) 时出错,Bundler 无法继续。
在捆绑之前确保gem install json -v '1.8.6' 成功。
在 Gemfile 中:
rails 被解析为 4.2.6,这取决于
actionmailer was resolved to 4.2.6, which depends on
actionpack was resolved to 4.2.6, which depends on
actionview was resolved to 4.2.6, which depends on
rails-dom-testing was resolved to 1.0.9, which depends on
rails-deprecated_sanitizer was resolved to 1.0.3, which depends on
activesupport was resolved to 4.2.6, which depends on
json
Gem::Ext::BuildError: ERROR: 未能构建 gem 原生扩展。
current directory: /tmp/bundler20180201-46774-s2jlm4json-1.8.6/gems/json-1.8.6/ext/json/ext/generator
/usr/bin/ruby2.3 -r ./siteconf20180201-46774-16pojxx.rb extconf.rb
mkmf.rb can't find header files for ruby at /usr/lib/ruby/include/ruby.h
这是什么意思以及如何纠正它。我已经尝试过更新和升级方法,有没有其他方法可以删除某些依赖项。
【问题讨论】:
-
尝试运行“bundle update”看看能否解决问题。
-
@zee 返回与捆绑安装相同的错误
-
你运行的是什么操作系统。
-
这里已经回答了同样的问题:stackoverflow.com/questions/4304438/…
-
运行 ubuntu 17.04。运行 sudo apt-get install ruby2.3-dev 时出现错误。以下软件包具有未满足的依赖关系:ruby2.3-dev:依赖:libgmp-dev,但不会安装 E:无法纠正问题,您持有损坏的软件包。
标签: ruby-on-rails json ruby