我在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(空行)
答案 0 :(得分:1)
删除每行开头的#字符。
deb repo用于二进制包
deb-src repo用于源包
答案 1 :(得分:1)
这样做
append_axes
答案 2 :(得分:0)
正如@nurza所说,你必须启用二进制存储库,擦除"#"在以#deb开头的行上。 /etc/apt/sources.list上的第一行应该有:
deb http://debian.mirrors.ovh.net/debian/ wheezy main