简体   繁体   English

运行rvm要求时出错

[英]error when run rvm requirements

I followed this tutorial to install rvm on ubuntu 12.04 when run rvm requirements , I got the following message 我按照本教程在运行rvm requirements时在ubuntu 12.04上安装rvm,得到以下消息

Installing requirements for ubuntu, might require sudo password.
Running 'apt-get --quiet --yes update' would require sudo.
Cowardly refusing to continue, please read 'rvm autolibs'.
Updating repositories
Missing required packages: libgdbm-dev, libffi-dev.
Cowardly refusing to continue, please read 'rvm autolibs'.

I got same message when run rvm install 1.9.3 运行rvm install 1.9.3时收到相同的消息

Can anyone help? 有人可以帮忙吗?

Thanks. 谢谢。

Sometimes the official documentation it's more reliable than a blog. 有时官方文档比博客更可靠。 Take a look at the rvm documentation. 看一下rvm文档。 The command from the blog to install rvm is: 来自博客的安装rvm的命令是:

curl -L get.rvm.io | bash -s stable

and the official documentation recommend that one: 官方文档建议:

\curl -L https://get.rvm.io | bash -s stable --autolibs=3 --rails

Probably this will solve your problems with autolibs, the same that was happening for example in that question . 也许这将解决您使用autolibs的问题,例如在该问题中所发生的事情。

from https://rvm.io/rvm/autolibs - there are two modes that will be useful for you: 来自https://rvm.io/rvm/autolibs-有两种模式对您有用:

  1. rvm autolibs read-only - it will do all the steps and only show the required commands / missing libraries rvm autolibs read-only -它将执行所有步骤,并且仅显示所需的命令/缺少的库
  2. rvm autolibs enable - it will install everything for you, it might require sudo password so a nice trick for tools like capistranos is to: rvm autolibs enable它将为您安装所有内容,可能需要sudo密码,因此对于像capistranos这样的工具,一个不错的技巧是:

     rvm autolibs read-only sudo rvm --autolibs=enabled requirements ruby-2.0.0 rvm install ruby-2.0.0 

A writeup about autolibs https://blog.engineyard.com/2013/rvm-ruby-2-0 有关autolibs的文章https://blog.engineyard.com/2013/rvm-ruby-2-0

I was getting some sort of same error: 我遇到了同样的错误:

Missing required packages: libreadline6, libreadline6-dev, libyaml-dev, libffi-dev. Cowardly refusing to continue, please read 'rvm autolibs'.

Even though Ubuntu Software Center showing "libreadline6, libreadline6-dev etc" installed. 即使Ubuntu软件中心显示“ libreadline6,libreadline6-dev等”已安装。

I got this fixed disabling autolibs: 我得到了这个固定的禁用自动库:

rvm autolibs disable

ruby install 1.9.X worked! 红宝石安装1.9.X的工作!

Below solution is to solve the rvm requirment error returns 100 下面的解决方法是解决rvm要求错误返回100

If any deb command is commented in /etc/apt/sources.list than try to uncomment that command from /etc/apt/sources.list 如果在/etc/apt/sources.list中注释了任何deb命令,则尝试从/etc/apt/sources.list取消注释该命令。

Command is: 命令是:

$sudo vi /etc/apt/sources.list

If problem is not solved than replace sources.list file with other Ubuntu's sources.list 如果问题仍未解决,请用其他Ubuntu的sources.list替换sources.list文件sources.list

Command is: 命令是:

$mv <file path of sources.list from other Ubuntu machine> /etc/apt/sources.list

Please make a backup before doing that 请先备份

Command is: 命令是:

$cp /etc/apt/sources.list sources_backup.list

Problem should solve by this time, if not than reinstall the Ubuntu. 这个问题应该在这个时候解决,如果不是重新安装Ubuntu的话。

Note: If sources.list file is corrupted than it will gives problem to install other packages. 注意:如果sources.list文件已损坏,则在安装其他软件包时会出现问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM