Ubuntu 11.04: `apt-get install rake` -> “E: Unable to locate package rake”

时光毁灭记忆、已成空白 提交于 2019-12-24 03:03:48

问题


This is probably a type of "is it plugged in?" question, but after getting a default Rackspace image of Ubuntu 11.04 up. Running command (as root)

apt-get install rake

Fails with error

Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package rake

I'm missing something simple I'm sure.


回答1:


It appears that rake package is not in the 11.04 sources, but it is in 10.10 sources.

To get apt-get install rake to work on 11.04:

Add the following lines to /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

Update package listing

apt-get update

Now rake should be available:

apt-get install rake




回答2:


Try gem install rake

It may be better to use rvm than Ubuntu's Ruby and Gem.



来源:https://stackoverflow.com/questions/8386794/ubuntu-11-04-apt-get-install-rake-e-unable-to-locate-package-rake

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!