Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

For many days I was trying to do apt-get update and I used to get a error: could not connect to server. I had thought it must be a issue related to my machine. Later, accidentally, when I copied and pasted a link from the sources file onto browser address bar I found that it was because the resolving of domain names of the repositories for my country was failing. I, painfully, edited the sources.list files on all my 3 machines from in.archive to us.archive. And it worked fine. So, my question is isn't it possible to specify multiple repositories existing is different locations?

share|improve this question
    
You're not the only one with issues with the Indonesian repo, see this question. I've never had problems with ubuntu's mirrors, multiple repositories are therefore not needed. –  Lekensteyn Apr 2 '11 at 14:17
    
It's Indian repo. –  nixnotwin Apr 2 '11 at 15:03
add comment

1 Answer 1

up vote 3 down vote accepted

It is completely possible to specify multiple repositories, for example:

deb http://in.archive.ubuntu.com/ubuntu/ natty main restricted
deb http://us.archive.ubuntu.com/ubuntu/ natty main restricted

If the same versions of the same packages are found in both listed repositories, apt will download the files from the first listed repository. If the first repository is out of date, and the second has newer files, then apt will pull from the second listed repository. If either of the repositories are down, apt will pull from the repository that remains up.

Note that you will still see complaints in your package managers if either repository is down, although this should not adversely affect your ability to download software unless all repositories are down.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.