【问题标题】:Ubuntu 11.04: `apt-get install rake` -> "E: Unable to locate package rake"Ubuntu 11.04:`apt-get install rake`->“E:无法找到软件包 rake”
【发布时间】:2011-12-05 14:28:29
【问题描述】:
这可能是一种“是否已插入?”问题,但是在获得 Ubuntu 11.04 的默认 Rackspace 映像之后。运行命令(以 root 身份)
apt-get install rake
因错误而失败
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package rake
我确定我错过了一些简单的东西。
【问题讨论】:
标签:
rake
ubuntu-11.04
apt-get
rackspace
【解决方案1】:
rake 包似乎不在 11.04 源中,但在 10.10 源中。
要让apt-get install rake 在 11.04 工作:
将以下行添加到/etc/apt/sources.list
deb http://archive.ubuntu.com/ubuntu/ maverick main restricted universe
deb-src http://archive.ubuntu.com/ubuntu/ maverick main restricted universe
更新软件包列表
apt-get update
现在rake 应该可用了:
apt-get install rake
【解决方案2】:
试试gem install rake
使用rvm 可能比使用 Ubuntu 的 Ruby 和 Gem 更好。