Monday, January 2, 2017

software sources - apt-get update fails to find some mirrors

I've configured my sources to use the mirrors:// "protocol" to find servers close to me, mainly since I move around a lot.


However, for some reason it doesn't work for all the repos - when I run sudo apt-get update I get a bunch of errors (about 45) like the following:


W: Failed to fetch mirror://mirrors.ubuntu.com/mirrors.txt/dists/raring/main/source/Sources  404  Not Found [Mirror: http://giano.com.dist.unige.it/ubuntu/]
W: Failed to fetch mirror://mirrors.ubuntu.com/mirrors.txt/dists/raring/universe/source/Sources 404 Not Found [Mirror: http://giano.com.dist.unige.it/ubuntu/]

If I remember correctly, I configured this through the GUI, but I still went and looked what the lines corresponding to those repos said in /etc/apt/sources.list - this is what I found:


deb-src mirror://mirrors.ubuntu.com/mirrors.txt raring main restricted
deb-src mirror://mirrors.ubuntu.com/mirrors.txt raring universe

(I couldn't map all the errors to lines from sources.list, but I guess that's just because I'm not 100% sure what I'm looking for...)


I thought the whole point of configuring the sources like this was to make sure that mirrors.ubuntu.com chooses a mirror that has the repositories you need. Why am I getting 404 errors here, and what can I do about it?


I'd prefer to still use the mirrors setup, rather than hard-coding specific servers to get everything from, if it's possible.


Update:
Thanks to helpful comments in the first couple of answers, I've been able to rule out both server maintenance and firewall issues - I have no problem getting other things from the same server, using the mirror protocol. The problem is that the sources aren't available on the mirror I'm pointed to. In other words, all the packages are there, so lines in sources.list that start with deb have no problems, but deb-src lines fail.


I've also verified by opening e.g. http://giano.com.dist.unige.it/ubuntu/dists/raring/main/ in my browser. According to the error message, apt-get looks for a subdirectory of this diriectory called source, which doesn't exist. So the problem is not connecting to the server, but that the server doesn't have the resources I'm looking for.


I assume it's up to the mirror to decide whether they want to provide the sources as well or just the packages, but I'm surprised that mirrors.ubuntu.com serves me a mirror that doesn't have what I ask for. I see three options, and I don't like either:



  • Hard-code the sources for deb-src resources to servers where I know they are available, i.e. sacrifice the mirror protocol in these instances.

  • Uncheck source pacakges in Software Sources, i.e. sacrifice downloading sources for the packages.

  • Ignore the error messages from apt-get and hope mirrors.ubuntu.com points me to a different server in the future.


Is there a fourth option, that actually solves the problem? =)

No comments:

Post a Comment

11.10 - Can't boot from USB after installing Ubuntu

I bought a Samsung series 5 notebook and a very strange thing happened: I installed Ubuntu 11.10 from a usb pen drive but when I restarted (...