2014-02-17 130 views
2

我試圖安裝一個紅寶石(Jekyll),並且不斷收到以下錯誤消息。在Raspbian錯誤上安裝Ruby Gem:無法構建Gem本機擴展

ERROR: Error installing jekyll: 
    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>' 

我正在使用樹莓派。當問紅寶石它的版本,我得到如下:

[email protected] ~ $ ruby -version 
ruby 1.9.3p194 (2012-04-20 revision 35410) [arm-linux-eabihf] 
-e:1:in `<main>': undefined local variable or method `rsion' for main:Object (NameError) 

幾個小時前,我通過運行以下命令安裝了最新版本的Ruby:

sudo curl -L https://get.rvm.io | bash -s stable --ruby 

爲了找出問題的根源我嘗試安裝不同的寶石(lolcat)。它成功安裝並完美工作。

我在做什麼錯?

預先感謝您!

回答

6

因此,我研究了StackOverflow的其他問題herehere,我發現這是因爲我有Ruby的版本。即使我安裝了最新的RVM,我必須通過運行以下命令來安裝Ruby的正確版本:

sudo apt-get install ruby1.9.1-dev 

解決我的問題。 :)

相關問題