繁体   English   中英

使用rvm安装最新的RUBY会在Ubuntu上出错

[英]Installing latest RUBY with rvm gives error on Ubuntu

我试图安装ruby-2.1.2时出现以下错误

rvm install ruby-2.1.2
Searching for binary rubies, this might take some time.
Found remote file https://rubies.travis-ci.org/ubuntu/12.04/x86_64/ruby-2.1.2.tar.bz2
Checking requirements for ubuntu.
Installing requirements for ubuntu.
Updating system................
Error running 'requirements_debian_update_system ruby-2.1.2',
showing last 15 lines of /usr/local/rvm/log/1400060285_ruby-2.1.2/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.
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
++ return 100
sudo apt-get install gawk g++ gcc make libc6-dev libreadline6-dev zlib1g-dev libssl-dev libyaml-dev libsqlite3-dev sqlite3 autoconf libgdbm-dev libncurses5-dev automake libtool bison pkg-config libffi-dev

我认为你的rvm是旧版本,

使用以下命令安装最新的(v1.25.25)rvm:

$ \\curl -L https://get.rvm.io | bash -s stable --ruby

然后检查此版本可用的红宝石:

$ rvm list known

然后安装最新的:

$ rvm install ruby-2.1.2

注意:即使它没有显示在rvm list known它也会尝试使用以下消息进行下载:

Installing Ruby from source to: /home/<YOUR_USER_NAME>/.rvm/rubies/ruby-2.1.2, this may take a while depending on your cpu(s)...

在我的情况下这个错误是因为apt-get update出错了。 在做了手动sudo apt-get update之后,我注意到其中一个repos发出错误“W:无法获取”。 编辑了repo列表并删除了导致错误的列表后我就能安装了。

尝试使用它来安装最新的ruby

rvm mount -r https://rvm.io/binaries/ubuntu/12.04/x86_64/ruby-1.9.3-p194.tar.bz2

寻求更多帮助

rvm help mount

我尝试了上面的大部分答案,但没有一个适合我,所以我只是更改服务器如果你使用rvm为ruby然后这将工作。

  1. 转到目录etc / apt
  2. 点击Sources.list
  3. 将服务器更改为我们或其他服务器
  4. 重新加载(它将从该服务器更新您的缓存)
  5. 然后运行sudo apt-get update
  6. 最后运行rvm install 2.3.0

暂无
暂无

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

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