user1366028
user1366028

Reputation: 41

Debian apache2 not found

I have a problem with installing apache2 on Debian. When I try to install I get

sudo apt-get install apache2
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package apache2

This is my repo (/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

And when I try to type apt-cache search apache2 it return null(empty line)

Upvotes: 1

Views: 2608

Answers (3)

Dhivin
Dhivin

Reputation: 706

do this

sudo apt-get update

sudo apt-get install apache2

Upvotes: 2

Roberto De Oliveira
Roberto De Oliveira

Reputation: 129

As @nurza said, you have to enable binary repos, erase the "#" on lines that begins with #deb. Your first line on /etc/apt/sources.list should have:

deb http://debian.mirrors.ovh.net/debian/ wheezy main

Upvotes: 0

Nurza
Nurza

Reputation: 231

Remove the # character at the beginning of each line.

deb repo are for binary packages

deb-src repo are for source packages

Upvotes: 1

Related Questions