![](/img/trans.png)
[英]"ERROR: Failed to build gem native extension." while installing Rails
[英]Error with gem extension while installing Apache Thrift
我正在從源代碼構建和安裝Apache Thrift。 運行make時,出現有關Gem native的以下錯誤。 我該如何處理這個gem本機擴展錯誤?
Gem::Installer::ExtensionBuildError: 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>'
Gem files will remain installed in /tmp/bundler20160731-25561-wpjc2k/eventmachine-1.2.0.1/gems/eventmachine-1.2.0.1 for inspection.
Results logged to /tmp/bundler20160731-25561-wpjc2k/eventmachine-1.2.0.1/gems/eventmachine-1.2.0.1/ext/gem_make.out
An error occurred while installing eventmachine (1.2.0.1), and Bundler cannot continue.
Make sure that `gem install eventmachine -v '1.2.0.1'` succeeds before bundling.
程序Apache Thrift需要其他依賴項,Apache Thrift安裝要求中未明確提及其中的一些依賴項。 要解決此錯誤,請執行以下操作:
sudo apt-get install ruby-dev
然后重試。 我的操作系統是Ubuntu。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.