【发布时间】:2014-02-25 14:10:02
【问题描述】:
我在 Debian 上安装 apache2 时遇到问题。当我尝试安装时,我得到了
sudo apt-get install apache2
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package apache2
这是我的仓库 (/etc/apt/sources.list)
#deb http://debian.mirrors.ovh.net/debian/ wheezy main
deb-src http://debian.mirrors.ovh.net/debian/ wheezy main
#deb http://security.debian.org/ wheezy/updates main
deb-src http://security.debian.org/ wheezy/updates main
#deb http://ppa.launchpad.net/webupd8team/java/ubuntu precise main
deb-src http://ppa.launchpad.net/webupd8team/java/ubuntu precise main
#deb http://ppa.launchpad.net/webupd8team/java/ubuntu precise main
deb-src http://ppa.launchpad.net/webupd8team/java/ubuntu precise main
deb http://security.ubuntu.com/ubuntu maverick-security main restricted
deb-src http://security.ubuntu.com/ubuntu maverick-security main restricted
deb http://security.ubuntu.com/ubuntu maverick-security universe
deb-src http://security.ubuntu.com/ubuntu maverick-security universe
deb http://security.ubuntu.com/ubuntu maverick-security multiverse
deb-src http://security.ubuntu.com/ubuntu maverick-security multiverse
当我尝试输入 apt-cache search apache2 时,它返回 null(空行)
【问题讨论】:
-
您的搜索命令有误。应该是:
apt-cache search apach2。您可能还想过滤结果:apt-cache search apache2 | grep ^apache2(当您相当确定您正在搜索的软件包将作为它自己的条目存在于 Debian 存储库中时很有用。)