Ubuntu 10.10 Maverick Server -- apt-get install commands fail

12,621

Solution 1

After much back and forth, it seems what fixed it was removing the "us" from the package URL (that is, changing "us.archive.ubuntu.com" to "archive.ubuntu.com").

It must be an issue with those servers or that particular domain.

Anyway, after editing the file to remove those references, it now appears to work.

I did this on a hunch -- a hunch that I'm now very glad I had! :)

This issue may be reported the Ubuntu team.

Solution 2

Your /etc/interfaces file looks fine, and since you managed to run apt-get update and apt-get upgrade successfully, this indicates that your network config is good.

As to why you can't install GNOME, the package is called gnome-desktop-environment rather than ubuntu-desktop. You may want to opt for gnome-core instead, which contains less bloat than the full blown desktop environment would.

If that doesn't work, please could you edit your original question to include the error text from apt-get.

Edit 1
Since you're getting package not found for everything, check out /etc/apt/sources.list and check the repositories for universe and multiverse aren't commented out (i.e have a # at the beginning of the line). If they are, remove the # and try again.

Edit 2
For the key error, try the following command sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 16126D3A3E5C1192. (Source)

Solution 3

This has happened to me too. What I did was reinstall ubuntu server and it simply worked. I think the problem was that I accidentally canceled the apt configuration during the install.

Share:
12,621

Related videos on Youtube

Ashok Kumawat
Author by

Ashok Kumawat

A mind at work. Microsoft MVP - Developer Technologies Lead of NUnit docs https://docs.nunit.org Trainer, Speaker, Blogger Interested in working together? https://seankilleen.com/hire/

Updated on September 17, 2022

Comments

  • Ashok Kumawat
    Ashok Kumawat over 1 year

    I'm new to Ubuntu Server and am trying to get a basic instance up and running. I'm having some issue installing the GUI (GNOME, correct?) through apt-get.

    Background:

    Host OS: Windows 7 Pro x64

    VM App: VirtualBox x64 (latest version)

    Network for VM: Bridged to my laptop's wireless card (gets connection fine; tested)

    Guest OS: Ubuntu 10.10 Maverick Server x64

    So Far:

    • I installed Ubuntu Maverick x64 with no problems. However, I didn't set up network connection during install (no connection at the time).
    • Edited my /etc/network/interfaces file to read the following (may be incorrect):

    auto lo

    iface lo inet loopback

    auto eth0

    iface eth0 inet dhcp

    • I edited /etc/apt/sources.list to remove comments for all repositories except the backport.
    • I ran "sudo apt-get update". It appeared to run fine and complete.
    • I ran "sudo apt-get upgrade". It appeared to download and upgrade a number of packages.

    The Issue:

    Whenever I run "sudo apt-get install ubuntu-desktop" it gives me an error that the package cannot be found. Same for many other popular packages (gedit, etc.) I have not been able to get a single package to install.

    Questions:

    • Does my network interfaces file appear to be correct or did I miss something?
    • Is "ubuntu-desktop" the correct package name that I should be searching for?
    • Can you think of anywhere else I might have gone wrong?

    Update: Error Information

    After being informed that I should try "sudo apt-get install gnome-desktop-environment", I tried that, but I got the same error that I've been getting.

    The error message, regardless of which package I try to install, continually comes back:

    Reading package lists... Done
    Building dependency tree
    Reading state information... Done
    E: Unable to locate package gnome-desktop-environment
    

    This error happens with ubuntu-desktop, gnome-desktop-environment, gedit, and any other packages I can think of.

    Update: sources.list snippets

    Because I think it might help, I'm re-typing some of my sources.list files so you get an idea of what's happening:

    sudo nano /etc/apt/sources.list outputs repositories such as:

    deb http://us.archive.ubuntu.com/ubuntu/ maverick main restricted
    deb-src http://us.archive.ubuntu.com/ubuntu/ maverick main restricted
    
    deb http://us.archive.ubuntu.com/ubuntu maverick universe
    deb-src http://us.archive.ubuntu.com/ubuntu/ maverick universe
    
    • user879702
      user879702 over 13 years
      It looks like there's something wrong with your sources.list. Are you sure you didn't accidentally comment something out?
    • Ashok Kumawat
      Ashok Kumawat over 13 years
      Just to clarify, I'm a programmer and understand the nature of comments. As far as I can tell, every line that begins with "deb" or "deb-src" has not been commented. I've also ensured that the text starts the line (i.e. no spaces before the beginning text, etc.) Also, it allowed me to do the initial update/upgrade, which is the most confusing part of all this.
  • gravyface
    gravyface over 13 years
    Yup, I usually use apt-cache search <package name> to make sure it's there or if I'm not sure, search for a partial string.
  • Ben Pilbrow
    Ben Pilbrow over 13 years
    There's also always apt-get install gnome-<tab>. I do love tab completion :)
  • Ashok Kumawat
    Ashok Kumawat over 13 years
    @Ben: No matter what, it tells me the package can't be found. I've updated my question to include the exact error.
  • Ashok Kumawat
    Ashok Kumawat over 13 years
    @gravyface: "sudo apt-cache search gnome-desktop-environment" just seems to return. I just get the next line in the console, waiting for a command.
  • Steven Monday
    Steven Monday over 13 years
    @goober: What does apt-cache policy gnome-desktop-environment return?
  • Ashok Kumawat
    Ashok Kumawat over 13 years
    @Steven: it returns "N: Unable to locate package gnome-desktop-environment".
  • Ashok Kumawat
    Ashok Kumawat over 13 years
    Also, FYI, I have uncommented every repository line in sources.list that pertains to a repository (i.e. not the text but all lines beginning with "deb", etc.) Same issue.
  • Ben Pilbrow
    Ben Pilbrow over 13 years
    @Goober - try apt-get update now you've uncommented the repositories and then try apt-get install gnome-core
  • Ashok Kumawat
    Ashok Kumawat over 13 years
    @Ben: Ran "sudo apt-get update", all updated except I got a "W: GPG" error for extras: "The following signature couldn't be verified because the public key is not available: NO_PUBKEY 16126D3A3E5C1192". Everything else appears to go fine. after that, I tried "sudo apt-get install gnome-core" and got the error "E: Unable to locate package gnome-core".
  • Ben Pilbrow
    Ben Pilbrow over 13 years
    @goober - Please see my update regarding the key error.
  • Ashok Kumawat
    Ashok Kumawat over 13 years
    Thanks Ben -- saw the update, it imported the key, ran update and upgrade. Still have the same issue, just not getting the key error now. Still no packages found.
  • Ashok Kumawat
    Ashok Kumawat over 13 years
    Everyone: I've added some snippets from my sources.list in the hopes that someone may see something amiss there. I'll retype the whole thing if you think it might help, but it seems doubtful.
  • Ashok Kumawat
    Ashok Kumawat over 13 years
    Hi All -- Solution found; please see my solution below. Thank you to all for your help in this matter!