RVM Ruby on Rails 安装

5
我很抱歉,我看不懂你的中文。您可以告诉我您需要翻译的语言吗?
Searching for binary rubies, this might take some time.
No binary rubies available for: ubuntu/12.04/i386/ruby-1.8.7-p371.Continuing with compilation. 
Please read 'rvm mount' to get more information on binary rubies.
Installing requirements for ubuntu, might require sudo password.

在更新行的末尾,我得到了以下输出:
输出 #2:
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

2
你正在使用受到 Ubuntu 影响的旧且损坏的版本。请尝试使用这个 - rails_id
@anonymousxxx 你是什么意思?我应该做什么? - fujisan
是的,我已经运行了那些命令。 - fujisan
我看到另一篇帖子解决了这个问题。但是步骤是关于禁用第三方ppa的。我该如何禁用它?每次运行“rvm install 1.8.7”时,我总是得到输出#2。 - fujisan
现在似乎可以工作了。感谢提供链接。我可以将其用于另一个设备的新安装。 - fujisan
显示剩余5条评论
1个回答

22

尝试在命令行单独运行sudo apt-get update。你的Ubuntu可能已经过时,其存储库可能已过时。因此,在您的计算机上apt-get update本身可能无法正常工作。

为了解决这个问题,请运行以下命令:

# Disable RVM from trying to install necessary software via apt-get
rvm autolibs disable

# Then try installing Ruby:
rvm install 1.8.7

如果您仍然遇到错误,请尝试在不执行 apt-get update(这会失败)的情况下直接执行 apt-get install

如果您仍然面临错误,请尝试直接运行apt-get install而不进行apt-get update(这将失败):

(Two possible translations depending on the context, please choose the most appropriate one.)
# Try to see if you can manually install the necessary software
sudo apt-get install build-essential openssl libreadline6 libreadline6-dev curl git-core zlib1g zlib1g-dev libssl-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt-dev autoconf libc6-dev ncurses-dev automake libtool bison subversion pkg-config
如果那个方法也不起作用,那么请粘贴您的apt-get update输出。

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接