try 使用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 sources有一个给出404或GPG错误的无效存储库,RVM将拒绝工作.这可能令人困惑,因为即使错误的存储库与rubyRVM无关,也会发生这种情况.

以下修复程序对我有效(Ubuntu):

运行apt-get update,查看是否有任何错误.编辑/etc/apt中的sources.listprecise.list以删除错误的存储库.重复,直到apt-get update次成功,没有任何错误.然后试着跑RVM.

Ruby相关问答推荐

如何查询哪些RuboCop规则适用于文件?

如何修复 '535-5.7.8 用户名和密码未被接受.在 Devise 邮件确认错误中了解更多信息?

这个#divmod 方法输出这个结果是做什么的?

如何在 Ruby 中验证来自多项 Select 提示的命令行输入?

Ruby:如何将两个返回值连接到一行中的两个字符串

如何使 Sinatra 通过 HTTPS/SSL 工作?

使用 Bundler 时,为什么要关心 RVM 的 Gemset 功能?

将ruby数组转换为连续对数组

将参数传递给erb视图

如何判断 Capistrano 中是否存在文件(在远程服务器上)?

Ruby 的排序方法使用哪种算法?

如何在运行时判断 Ruby 中的 Gem 版本?

Ruby:更新哈希值的最简单方法是什么?

Ruby 数组中的奇数(或偶数)条目

如何在 Ruby 中遍历多行字符串?

如何在 Ruby 脚本中运行 Rake 任务?

在 Ruby 中使用元组?

为什么compass watch说它无法加载 sass/script/node (LoadError)?

相当于 Ruby 的 cURL?

从 'mm/dd/yyyy' 格式解析 ruby​​ DateTime