0
我從源代碼構建和安裝Apache Thrift。當我運行make時,出現以下關於Gem native的錯誤。我該如何處理這個gem原生擴展錯誤?安裝Apache Thrift時使用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.
看起來你缺少ruby-dev庫。你在使用什麼平臺? Linux呢?達爾文? – avellable
是的,我是。我安裝了ruby-dev,修復了錯誤。我在Linux上。 – nikk
您能否請您寫一個答案,以便下次找解答的人可以看到答案? – avellable