Find the answer to your Linux question:
Results 1 to 8 of 8
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 ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Aug 2008
    Posts
    4

    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!

  2. #2
    Linux Engineer jledhead's Avatar
    Join Date
    Oct 2004
    Location
    North Carolina
    Posts
    1,077
    probably would have been better under the debian section vs the server section. either way,

    Code:
    apt-get update
    apt-get install apache2
    if that still doesn't work then post the contents of /etc/apt/sources.list

  3. #3
    Just Joined!
    Join Date
    Aug 2008
    Posts
    4
    Yea I had already tried the apt-get update thing. And sorry for the wrong forum.

    Here is my /etc/apt/sources.list :

    Code:
    # 
    # 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/]Debian -- Security Information etch/updates main contrib
    deb-src http://security.debian.org/]Debian -- Security Information etch/updates main contrib

    Thanks a lot for your help btw.

  4. #4
    Linux Newbie
    Join Date
    Jun 2006
    Location
    Greece, Athens
    Posts
    214
    It seems that you have not enabled all the necessary repositories. Can't tell you which though, i use Ubuntu, so better ask the Debian forum... If you enable them you 'll find apache.

  5. #5
    Linux Engineer jledhead's Avatar
    Join Date
    Oct 2004
    Location
    North Carolina
    Posts
    1,077
    you need to add something like this
    Code:
         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
    taken from APT HOWTO - Basic Configuration

    and then rerun my above commands

  6. #6
    Just Joined!
    Join Date
    Aug 2008
    Posts
    4
    Hey thanks a lot for the repositories. Someone else just told me to use these repositories:

    deb ftp.osuosl.org :: Oregon State University Open Source Lab etch main contrib non-free
    deb-src ftp.osuosl.org :: Oregon State University Open Source Lab etch main contrib non-free

    I added them and it worked. Should I add the repositories you suggested above too? I don't see how it could hurt to have more.

    Anyways, I'm going to work now until tonight. I'll get apache installed and everything else hopefully. Thanks a lot!

  7. #7
    Linux Engineer jledhead's Avatar
    Join Date
    Oct 2004
    Location
    North Carolina
    Posts
    1,077
    the only difference between the repository I put and the ones you listed are location. you don't need more than one stable main contrib non-free
    just like you don't need more than one security repository. The only reason you should change those is if its slow for you, change it to a faster one
    Debian worldwide mirror sites

  8. #8
    Just Joined!
    Join Date
    Aug 2008
    Posts
    4
    Oh OK that makes sense, I see what you mean. Well I guess for my purposes I am just going to leave it how it is now because it works and I won't really be downloading packages that often since I just need to download my main server components and then thats it. Thanks for clearing it up for me though!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •