As vasa1 pointed out, the server your system is configured to use to download packages for installation is currently down.
What to do when your download mirror is down...
The solution to this problem is to use change it to a different mirror (i.e., a different server).
Option 1: Using Graphical Configuration Utilities
Open Software Sources
Press Alt+F2, type
gksu software-properties-gtk, and enter your password. (Alternatively, select Settings... at the lower left corner of the Update Manager, or go to Settings > Repositories in Synaptic).
- That's for Ubuntu 10.04 LTS, which you are running. In later releases, you can just run
software-properties-gtk and when you make changes, PolicyKit will authenticate you.
- Most people using newer releases have the Software Center and not Synaptic. In the Software Center, you would go to Edit > Software Sources....
- The Update Manager is unchanged, but in new releases is called the Software Updater.
Change the Download Server
In the Ubuntu Software tab of the Software Sources window, there is a drop-down menu labeled Download from. Select your regional server. For example, I'm in the United States and it looks like this on my 11.10 machine:
Software Sources window showing Sever for United States being selected in the "Download from" drop-down menu.
You may see other servers listed in that short list (like the server you currently have set up).
You can use the Main server too but it is almost always considerably slower than using your regional server. (At least in the United States, anyway.)
If you want to use another mirror, you can look through a list of mirrors by clicking Other....
Option 2: Manually Editing a Configuration File
Back Up and Open
Back up your
sources.list file and open it in a text editor:
sudo cp sources.list sources.list.old
gksu gedit sources.list
- If you've already ran the second line, don't do it again, unless you want to overwrite the old backup with a copy of the new configuration.
- For a text-based editor (not requiring any GUI), replace the third line with
sudo nano -w sources.list (or
sudo vi sources.list, or
sudo -e sources.list).
In the text editor, replace every instance of your old server name with the new server name. For example, you could replace every instance of
us.archive.ubuntu.com. (Your text editor, whichever you use, will facilitate this--you don't have to manually find each instance and type in the name of the new mirror.)
Save the file, quit the text editor, run
sudo apt-get update, and it should work with the new server.
Option 3: Command Line Substitution
sed allows you to write simple (or complicated) scripts that act on a file, one line at a time. So you can issue a single command that goes through
sources.list, replacing all the instances of the old server name with the new server name.
First, go into
/etc/apt and (unless you did so recently) back up the file:
sudo cp sources.list sources.list.old
sudo cp sources.list sources.list.tmp
sed 's/ubuntuarchive.hnsdc.com/us.archive.ubuntu.com/' sources.list.tmp | sudo tee sources.list
sudo rm sources.list.tmp
- For an old server besides
ubuntuarchive.hnsdc.com, change that as appropriate.
- For a new server besides
us.archive.ubuntu.com, change that as appropriate.
- I decided to copy
sources.list into a temporary file and use that as
sed's input. This is one way to ensure that
sed is not overwriting the file while it's still reading it.
sed "script" here is very simple. This explains how substitution works.
But what download servers are there?
There are over 400 registered Ubuntu mirrors for installing and updating software.
These are called archive mirrors. This should not be confused with CD mirrors, where ISO images and related files for installing Ubuntu are stored.
Many servers provide both, and are thus both archive mirrors and CD mirrors. But many are just one of the two.