Ruby RVM apt-get更新错误

我试图安装任何东西与RVM时得到以下错误:

Searching for binary rubies, this might take some time.
Found remote file https://rvm.io/binaries/ubuntu/13.04/x86_64/ruby-2.1.1.tar.bz2
Checking requirements for ubuntu.
Installing requirements for ubuntu.
Updating system..kshitiz password required for 'apt-get --quiet --yes update': 
............................
Error running 'requirements_debian_update_system ruby-2.1.1',
showing last 15 lines of /home/kshitiz/.rvm/log/1400047196_ruby-2.1.1/update_system.log
++ /scripts/functions/logging : rvm_pretty_print()  78 > case "${TERM:-dumb}" in
++ /scripts/functions/logging : rvm_pretty_print()  81 > case "$1" in
++ /scripts/functions/logging : rvm_pretty_print()  83 > [[ -t 2 ]]
++ /scripts/functions/logging : rvm_pretty_print()  83 > return 1
++ /scripts/functions/logging : rvm_error()  117 > printf %b '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
\n'
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

++ /scripts/functions/requirements/ubuntu : requirements_debian_update_system()  53 > return 100
Requirements installation failed with status: 100.

如何解决这个问题?

最佳答案
如果apt-get update有错误,RVM的行为不会很好。如果你的apt源有一个无效的存储库,给出404或GPG错误,RVM将拒绝工作。这可能是混乱,因为它发生即使故障存储库与ruby或RVM无关。

下面的修复适用于我(Ubuntu):

运行apt-get update,看看是否有任何错误。在/ etc / apt中编辑sources.list和precise.list以删除有缺陷的存储库。重复,直到apt-get更新成功,没有任何错误。然后尝试运行RVM。

转载注明原文:Ruby RVM apt-get更新错误 - 代码日志