LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 08-10-2008, 09:45 PM   #1
ScottG489
LQ Newbie
 
Registered: Aug 2008
Posts: 3

Rep: Reputation: 0
apt-get apache2 problem - Debian


So my problem is pretty simple. I just installed Debian onto one of my old computers to use it as a server. I am trying to download and install apache2 using "apt-get install apache2". However, when I type that, I get this error:

Reading package lists... Done
Building dependency tree... Done
Package apache2 is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package apache2 has no installation candidate

First let me get a few things out of the way. Yes I am logged in with root privileges by using "su" and logging in before I use apt-get ("sudo" isn't on this system for w/e reason). I have also looked around on Google without too much luck.

Does anyone know what the problem is and how to fix it? Thanks in advance!
 
Old 08-10-2008, 11:09 PM   #2
klearview
Member
 
Registered: Aug 2006
Location: London
Distribution: Debian, Kubuntu
Posts: 572

Rep: Reputation: 75
My guess would be that your repositories are not configured properly in /etc/apt/sources.list .
 
Old 08-10-2008, 11:23 PM   #3
ScottG489
LQ Newbie
 
Registered: Aug 2008
Posts: 3

Original Poster
Rep: Reputation: 0
Here is my /etc/apt/sources.list :

#
# deb cdrom:[Debian GNU/Linux 4.0 r3 _Etch_ - Official i386 NETINST Binary-1 20080218-14:15]/ etch contrib main

deb cdrom:[Debian GNU/Linux 4.0 r3 _Etch_ - Official i386 NETINST Binary-1 20080218-14:15]/ etch contrib main

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

Last edited by ScottG489; 08-10-2008 at 11:27 PM.
 
Old 08-10-2008, 11:31 PM   #4
klearview
Member
 
Registered: Aug 2006
Location: London
Distribution: Debian, Kubuntu
Posts: 572

Rep: Reputation: 75
get rid of the line for cdrom (put # in front of it)

add the following 2 lines:

deb http://ftp.us.debian.org/debian/ etch main contrib non-free
deb-src http://ftp.us.debian.org/debian/ etch main contrib non-free


Save it and do 'apt-get update' and see if it helps.
 
Old 08-11-2008, 07:02 AM   #5
ScottG489
LQ Newbie
 
Registered: Aug 2008
Posts: 3

Original Poster
Rep: Reputation: 0
Ok, I think I had tried to uncomment that one line before and it didn't work, so I just put it back. I also just noticed that both those lines are exactly the same...weird. Ok I'm going to try to comment that line out and add those two other lines now......

YES! It worked. I really thought it was a problem with my repositories. Ok, well I will set apache2 up later. I am working pretty much all day.

Someone else also recommended adding the following repositories:

deb http://http.us.debian.org/debian stable main contrib non-free
deb http://non-us.debian.org/debian-non-US stable/non-US main contrib non-free

Should I? It doesn't seem like it could be a problem to have more repositories.

Thanks again!
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem while apt-get update on debian etch, cannot reach security.debian.org sarajevo Debian 4 06-08-2008 11:59 AM
Apache2 and CGI problem on Debian Etch jwaters504 Linux - Server 2 09-19-2007 08:28 PM
Debian, apache2, CGI problem daviddutch1964 Linux - Networking 1 06-29-2007 03:19 PM
Debian, apache2, CGI problem daviddutch1964 Linux - Server 0 06-29-2007 02:14 PM
Debian unstable - apt-get upgrade broke apache2 GT_Onizuka Debian 3 10-10-2006 06:06 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 10:21 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration