在尝试安装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
答案 0 :(得分:6)
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
答案 1 :(得分:1)
我认为您的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)...
答案 2 :(得分:1)
我的情况下这个错误是因为apt-get update给出了n错误。在做了手动sudo apt-get update之后,我注意到其中一个repos发出错误“W:无法获取”。在编辑了repo列表并删除了我能够安装的错误之后。
答案 3 :(得分:0)
尝试使用它来安装最新的ruby
rvm mount -r https://rvm.io/binaries/ubuntu/12.04/x86_64/ruby-1.9.3-p194.tar.bz2
获取更多帮助
rvm help mount
答案 4 :(得分:0)
我尝试了上述大部分答案,但没有一个对我有用,所以我只是改变服务器 如果你使用rvm作为ruby,那么这将有效。
sudo apt-get update
rvm install 2.3.0