2012-07-09 140 views
1

我無法安裝linecache19 gem通過捆綁軟件安裝ruby 1.9.2在aptosid(即debian sid)上的rvm安裝。error安裝linecache19 gem bundler rvm

我是新來的紅寶石,但我的紅寶石安裝顯然不完全錯誤配置,因爲我已經能夠安裝軌道和一堆寶石。

輸出我得到的是以下幾點:

Installing linecache19 (0.5.12) with native extensions 
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension. 

     /home/caz/.rvm/rubies/ruby-1.9.2-p320/bin/ruby extconf.rb     
*** extconf.rb failed ***               
Could not create Makefile due to some reason, probably lack of      
necessary libraries and/or headers. Check the mkmf.log file for more    
details. You may need configuration options.          

Provided configuration options:             

/home/caz/.rvm/rubies/ruby-1.9.2-p320/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require': no such file to load -- openssl (LoadError)    
ms/custom_require.rb:36:in `require'            
in `<top (required)>'                
ms/custom_require.rb:36:in `require' 
     from /home/caz/.rvm/rubies/ruby-1.9.2-p320/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require' 
     from /home/caz/.rvm/gems/ruby-1.9.2-p320/gems/ruby_core_source-0.1.5/lib/contrib/uri_ext.rb:11:in `<top (required)>' 
     from /home/caz/.rvm/rubies/ruby-1.9.2-p320/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require' 
     from /home/caz/.rvm/rubies/ruby-1.9.2-p320/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require' 
     from /home/caz/.rvm/gems/ruby-1.9.2-p320/gems/ruby_core_source-0.1.5/lib/ruby_core_source.rb:6:in `<top (required)>' 
     from <internal:lib/rubygems/custom_require>:33:in `require' 
     from <internal:lib/rubygems/custom_require>:33:in `rescue in require' 
     from <internal:lib/rubygems/custom_require>:29:in `require' 
     from extconf.rb:2:in `<main>' 


Gem files will remain installed in /home/caz/.rvm/gems/ruby-1.9.2-p320/gems/linecache19-0.5.12 for inspection. 
Results logged to /home/caz/.rvm/gems/ruby-1.9.2-p320/gems/linecache19-0.5.12/ext/trace_nums/gem_make.out 
An error occured while installing linecache19 (0.5.12), and Bundler cannot continue. 
Make sure that `gem install linecache19 -v '0.5.12'` succeeds before bundling. 

我已經試過這通常是建議的解決方案:

gem install ruby-debug19 -- --with-ruby-include=$rvm_path/src/ruby-1.9.2-p320 

我一直在使用沒有成功--force選項也嘗試按以下內容:

Installing Gems without rvm, as root, with explicit version of ruby

我CON在產出報告的路徑中出現了「1.9.1」的融合 - 我想知道這是否是debian ruby​​軟件包的宿醉和我的問題的根源。

ps這些都是爲了安裝Smallest Federated Wiki。我鼓勵讀者看看這個項目。

+0

可能缺少libopenssl軟件包或其他東西? – rogerdpack 2012-07-09 22:21:40

+0

也許你只需要用調試器替換ruby-debug19,它包含了所有東西的頭文件。看到我在這個問題的答案http://stackoverflow.com/a/10414984/773690 – iblue 2012-07-20 19:38:30

+0

試圖安裝調試器有同樣的問題。最後是什麼解決了它是刪除我的系統openssl包(這一步我認爲沒有必要),在本地安裝rvm openssl包並指向它的ruby。這個解決方案實際上是在我喜歡的問題中的其中一個snwers中描述的.... Duh! – maninalift 2012-08-13 20:22:09

回答

2
在終端

進入rvm requirements

它會爲您提供類似

Additional Dependencies: 
# For Ruby/Ruby HEAD (MRI, Rubinius, & REE), install the following: 
    ruby: /usr/bin/apt-get install build-essential openssl libreadline6 libreadline6-dev curl git-core zlib1g zlib1g-dev libssl-dev libyaml-dev libsqlite3-0 libsqlite3-dev sqlite3 libxml2-dev libxslt-dev autoconf libc6-dev ncurses-dev automake libtool bison subversion 

接着複製命令並運行它。它將安裝運行ruby所需的所有依賴項。

+0

謝謝你的迴應。我已經做到了。我應該提到這一點,但是當我寫這篇文章的時候,我非常沮喪。後期我會更新我的問題,並詳細介紹我所做的事情。 – maninalift 2012-07-10 14:55:46

+0

這正是我需要解決的問題。唯一的解決辦法是如果你已經安裝了Ruby解釋器,用'rvm reinstall 1.9.3'來跟蹤該命令。 – 2012-09-16 04:38:54

+0

啊是的。我很抱歉,我也應該提到這一點。 – sohaibbbhatti 2012-09-17 06:41:16