尝试使用RVM安装Ruby时,为什么会出现需求错误?

我想在我的Ubuntu系统上安装带有RVM的Ruby 2.0并收到错误消息:

rvm 1.23.5 (master) ubuntu 12.04 (LTS) **---- Error message: -------** rvm install 2.0.0 Searching for binary rubies, this might take some time. Checking requirements for ubuntu. Installing requirements for ubuntu. Updating system..................................................................................................................................... Error running 'requirements_debian_update_system ruby-2.0.0-p247', please read /home/emzett/.rvm/log/1381812161_ruby-2.0.0-p247/update_system.log Requirements installation failed with status: 100. 

使用以下方法更新系统

 sudo apt-get update 

尝试:

 rvm remove 2.0.0 # uninstall rvm rvm get head --autolibs=3 # get the latest RVM and build required libs rvm requirements # check if there are any dependencies that need to be installed. rvm install ruby-2.0.0 

我通过编辑解决了这个问题

 etc/apt/source.list.d/medibuntu.list 

我只是评论了指向medibuntu的那一行。

https://gist.github.com/pcjpcj2/5443017

我推荐这个要点。

如果你需要Ruby on Rails 4.0~,最好的答案就在这里

我遇到过同样的问题。 我运行以下命令来修复它:

sudo apt-get -f install

然后我记得当天早些时候我没有安装包。 这个命令做的是解决该包的依赖关系并允许RVM做它的事情。

当/etc/apt/sources.list.d或/etc/apt/sources.list.d中存在损坏的源时会发生这种情况。

您可以运行Ubuntu软件更新以查看是否由于源损坏而导致任何故障,如果是,请按照以下步骤操作

  • 修复它们或评论并执行以下步骤
  • rvm要求 – 这将安装所有必需的软件模块
  • rvm list – 为您提供可用的ruby版本
  • rvm install ruby​​-xxx – 这将安装xxx版本的ruby,请用你感兴趣的版本更改ruby-xxx(ruby-2.1.0 for 2.1.0版本的ruby)