LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   E: Unable to locate package Apache while installing Apache. (https://www.linuxquestions.org/questions/linux-newbie-8/e-unable-to-locate-package-apache-while-installing-apache-937653/)

ft85 04-02-2012 05:10 AM

E: Unable to locate package Apache while installing Apache.
 
hi every body


am having a big issue installing apache on my linux Debian 6.0.2.1 netinst , whenever i install i get an error below

Kindly assist me.

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

repo 04-02-2012 05:12 AM

Try
Code:

apt-get install apache2
Kind regards

acid_kewpie 04-02-2012 05:13 AM

I think the package is called apache2. check "apt-cache search apache"

ft85 04-02-2012 05:21 AM

Quote:

Originally Posted by repo (Post 4642556)
Try
Code:

apt-get install apache2
Kind regards

hi , i have tried with apt-get install apache2 , i still get the error saying
apt-get install apache2
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package apache2

i don't know why this happens

ft85 04-02-2012 05:23 AM

after doing apt-get install apache2

am still getting the errors below


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


any help will be much appreciate

TobiSGD 04-02-2012 05:37 AM

Please post the contents of /etc/apt/sources.list.

ft85 04-02-2012 10:34 AM

Quote:

Originally Posted by TobiSGD (Post 4642570)
Please post the contents of /etc/apt/sources.list.


hi below is what i have in sources.list

#

# deb cdrom:[Debian GNU/Linux 6.0.4 _Squeeze_ - Official amd64 NETINST Binary-1 20120129-00:39]/ squeeze main

#deb cdrom:[Debian GNU/Linux 6.0.4 _Squeeze_ - Official amd64 NETINST Binary-1 20120129-00:39]/ squeeze main

deb http://security.debian.org/ squeeze/updates main
deb-src http://security.debian.org/ squeeze/updates main

TobiSGD 04-02-2012 04:34 PM

OK, you are missing the main repos in your sources.list. This is why you can't install Apache. Add the line
Code:

deb http://ftp.tu-chemnitz.de/pub/linux/debian/debian/ squeeze main
to your sources.list file (may be choose a mirror more appropriate to your location, mirror list is here), then launch the command
Code:

apt-get update
to update the package database and
Code:

apt-get install apache2
to install Apache.

ft85 04-03-2012 02:26 AM

Quote:

Originally Posted by TobiSGD (Post 4642967)
OK, you are missing the main repos in your sources.list. This is why you can't install Apache. Add the line
Code:

deb http://ftp.tu-chemnitz.de/pub/linux/debian/debian/ squeeze main
to your sources.list file (may be choose a mirror more appropriate to your location, mirror list is here), then launch the command
Code:

apt-get update
to update the package database and
Code:

apt-get install apache2
to install Apache.


hi

i have just followed your reply and i add a a new line as you mentioned , but after i do apt-get update , i get the following error

apt-get update
Err http://ftp.tu-chemnitz.de squeeze Release.gpg
Could not resolve 'ftp.tu-chemnitz.de'
Err http://ftp.tu-chemnitz.de/pub/linux/debian/debian/ squeeze/main Translation- en
Could not resolve 'ftp.tu-chemnitz.de'
Err http://ftp.tu-chemnitz.de/pub/linux/debian/debian/ squeeze/main Translation- en_GB
Could not resolve 'ftp.tu-chemnitz.de'
Err http://security.debian.org squeeze/updates Release.gpg
Could not resolve 'security.debian.org'
Err http://security.debian.org/ squeeze/updates/main Translation-en
Could not resolve 'security.debian.org'
Err http://security.debian.org/ squeeze/updates/main Translation-en_GB
Could not resolve 'security.debian.org'
Reading package lists... Done
W: Failed to fetch http://security.debian.org/dists/squ...es/Release.gpg Could not resolve 'security.debian.org'

W: Failed to fetch http://security.debian.org/dists/squ...s/main/i18n/Tr anslation-en.gz Could not resolve 'security.debian.org'

W: Failed to fetch http://security.debian.org/dists/squ...s/main/i18n/Tr anslation-en_GB.gz Could not resolve 'security.debian.org'

W: Failed to fetch http://ftp.tu-chemnitz.de/pub/linux/...an/dists/squee ze/Release.gpg Could not resolve 'ftp.tu-chemnitz.de'

W: Failed to fetch http://ftp.tu-chemnitz.de/pub/linux/...an/dists/squee ze/main/i18n/Translation-en.gz Could not resolve 'ftp.tu-chemnitz.de'

W: Failed to fetch http://ftp.tu-chemnitz.de/pub/linux/...an/dists/squee ze/main/i18n/Translation-en_GB.gz Could not resolve 'ftp.tu-chemnitz.de'

W: Some index files failed to download, they have been ignored, or old ones used instead.

TobiSGD 04-03-2012 06:16 AM

May it be possible that your network is not up and running, since it can't resolve two totally different hostnames?


All times are GMT -5. The time now is 12:18 AM.