2013-05-26 251 views
5

我在我的機器上安裝RVM ROR使用Ubuntu 12.04RVM Ruby on Rails的安裝

這裏的輸出我得到一個麻煩:

輸出#1:

Searching for binary rubies, this might take some time. 
No binary rubies available for: ubuntu/12.04/i386/ruby-1.8.7-p371.Continuing with compilation. 
Please read 'rvm mount' to get more information on binary rubies. 
Installing requirements for ubuntu, might require sudo password. 

,並在更新的行結束時,我得到這個:

輸出#2:

There has been error while updating 'apt-get', please give it some time and try again later. 
For 404 errors check your sources configured in: 
/etc/apt/sources.list 
/etc/apt/sources.list.d/*.list 
+2

你正在使用舊的和破碎的(由Ubuntu)。試試[這](http://stackoverflow.com/a/9056395/1297435) –

+0

@anonymousxxx你是什麼意思?我該怎麼辦? – fujisan

+0

您是否看到我的評論中的鏈接? –

回答

17

嘗試在命令行上單獨運行sudo apt-get update。你的Ubuntu可能會過時,它的存儲庫可能會過時。所以apt-get update本身可能不適用於你的機器。

跨過這問題,運行以下命令:

# Disable RVM from trying to install necessary software via apt-get 
rvm autolibs disable 

# Then try installing Ruby: 
rvm install 1.8.7 

如果你仍然面臨錯誤,看看你能不能直接做apt-get install沒有做apt-get update(這失敗):

# Try to see if you can manually install the necessary software 
sudo apt-get install build-essential openssl libreadline6 libreadline6-dev curl git-core zlib1g zlib1g-dev libssl-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt-dev autoconf libc6-dev ncurses-dev automake libtool bison subversion pkg-config 

如果這也不起作用,那麼粘貼你的apt-get update輸出。

+1

這是正確的答案。 – mainframer