我在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(空行)
发布于 2017-03-27 15:13:49
执行此操作
sudo apt-get update
sudo apt-get install apache2发布于 2015-02-06 18:19:40
删除每行开头的#字符。
deb repo用于二进制包
deb-src repo用于源包
发布于 2015-05-08 02:58:59
正如@nurza所说,您必须启用二进制repos,删除以#deb开头的行中的"#“。/etc/apt/Soures.list上的第一行应该是:
deb http://debian.mirrors.ovh.net/debian/ wheezy mainhttps://stackoverflow.com/questions/22016659
复制相似问题