2017-02-20 55 views
1

我使用的是Ubuntu 16.04,ruby 2.0.0,rails 4.0.13和mongoDB 3.4.2。 我想更新紅寶石2.2.2,但我得到的錯誤:如何在Ubuntu 16.04中將ruby從2.0.0更新到2.2.2?

Error running 'requirements_debian_update_system ruby-2.2.6', 
showing last 15 lines of /home/lakhvir/.rvm/log/1487593522_ruby-2.2.6/update_system.log 
++ case "${TERM:-dumb}" in 
++ case "$1" in 
++ [[ -t 2 ]] 
++ return 1 
++ printf %b 'There has been error while updating '\''apt-get'\'', please give it some time and try again later. 
404 errors should be fixed for rvm to proceed. Check your sources configured in: 
    /etc/apt/sources.list 
    /etc/apt/sources.list.d/*.list 
\n' 
There has been error while updating 'apt-get', please give it some time and try again later. 
404 errors should be fixed for rvm to proceed. Check your sources configured in: 
    /etc/apt/sources.list 
    /etc/apt/sources.list.d/*.list 

++ return 100 
Requirements installation failed with status: 100. 
+0

也許這已經回答的鏈接可以幫助你嗎? http://stackoverflow.com/questions/23650992/ruby-rvm-apt-get-update-error – xenover

+0

你按照什麼步驟升級? –

+0

當我使用(sudo apt-get update | grep「Failed」)命令時,我得到(W:GPG錯誤:http://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.2版本:以下簽名無法驗證,因爲公鑰不可用:NO_PUBKEY D68FA50FEA312927 W:存儲庫'http://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.2 Release'未簽名。 E:未能獲取http://repo.mongodb.org/apt/ubuntu/dists/xenial/mongodb-org/3.0/multiverse/binary-amd64/Packages 404未找到 E:某些索引文件未能下載。他們被忽略了,或者老的被用掉了。) –

回答

2

首先,你應該立即升級您的Rails的版本: Ruby on Rails 4.0 End of Life was in January 2015.

至於它看起來像APT-其他錯誤得到更新以某種方式窒息。我會在通過rvm之前嘗試修復它。

apt-get update 

apt-get dist-upgrade 

(請確保您瞭解這些運行之前做的)。如果您在那裏遇到錯誤,請確保您的文件都是正確的。