[SOLVED] Debian: a few 404 errors when installing packages => changing sources.list?
Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Debian: a few 404 errors when installing packages => changing sources.list?
We have this Debian 9 machine with several small problems. One of them is that it always gave a few 404 errors when installing very common packages! One recent example: gimp. And the errors shown are in the domain debian.org, something I find very strange.
In the end, we always had the option to "continue without them" when installing from Synpactic. So Gimp is installed and usable, as other packages installed before, with something probably missing. But I did not notice anything in the times I used Gimp - not that I searched for it, I just did what I wanted to do, and it worked fine.
I imagine the problem and solution should be something to be changed in /etc/apt/sources.list . Is this a good idea? What is there is probably what Debian put there when it was installed:
Code:
deb http://ftp.us.debian.org/debian/ stretch main
deb-src http://ftp.us.debian.org/debian/ stretch main
deb http://security.debian.org/debian-security stretch/updates main
deb-src http://security.debian.org/debian-security stretch/updates main
deb http://ftp.us.debian.org/debian/ stretch-updates main
deb-src http://ftp.us.debian.org/debian/ stretch-updates main
And nothing else there, just comments.
Today, when trying to install another package, I could not progress without *removing* Gimp, which I do not want to do. I would, at most, install it right after with the same dependency problem it has now. To install without fixing the problem, I tried to:
- install with Synaptic (asked to remove or to fix broken packages first);
- install with aptitude (similar result to Synaptic's);
- install with "apt-get install" (suggested doing 'apt --fix-broken install', which was something I did not see before).
I decided to try that 'apt --fix*' fix, and its result is not good. See what is on my terminal now:
Code:
# apt --fix-broken install
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following additional packages will be installed:
libavcodec57 libavformat57 libavutil55 libopenmpt0 libraw15 libswresample2 libswscale4
The following NEW packages will be installed:
libavcodec57 libavformat57 libavutil55 libopenmpt0 libraw15 libswresample2 libswscale4
0 upgraded, 7 newly installed, 0 to remove and 1 not upgraded.
3 not fully installed or removed.
Need to get 6585 kB of archives.
After this operation, 20.2 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Err:1 http://ftp.us.debian.org/debian stretch/main amd64 libavutil55 amd64 7:3.2.5-1
404 Not Found [IP: 2600:3404:200:237::2 80]
Err:2 http://ftp.us.debian.org/debian stretch/main amd64 libswresample2 amd64 7:3.2.5-1
404 Not Found [IP: 2600:3404:200:237::2 80]
Err:3 http://ftp.us.debian.org/debian stretch/main amd64 libavcodec57 amd64 7:3.2.5-1
404 Not Found [IP: 2600:3404:200:237::2 80]
Err:4 http://ftp.us.debian.org/debian stretch/main amd64 libopenmpt0 amd64 0.2.7386~beta20.3-3
404 Not Found [IP: 2600:3404:200:237::2 80]
Err:5 http://ftp.us.debian.org/debian stretch/main amd64 libavformat57 amd64 7:3.2.5-1
404 Not Found [IP: 2600:3404:200:237::2 80]
Err:6 http://ftp.us.debian.org/debian stretch/main amd64 libraw15 amd64 0.17.2-6+b1
404 Not Found [IP: 2600:3404:200:237::2 80]
Err:7 http://ftp.us.debian.org/debian stretch/main amd64 libswscale4 amd64 7:3.2.5-1
404 Not Found [IP: 2600:3404:200:237::2 80]
E: Failed to fetch http://ftp.us.debian.org/debian/pool/main/f/ffmpeg/libavutil55_3.2.5-1_amd64.deb 404 Not Found [IP: 2600:3404:200:237::2 80]
E: Failed to fetch http://ftp.us.debian.org/debian/pool/main/f/ffmpeg/libswresample2_3.2.5-1_amd64.deb 404 Not Found [IP: 2600:3404:200:237::2 80]
E: Failed to fetch http://ftp.us.debian.org/debian/pool/main/f/ffmpeg/libavcodec57_3.2.5-1_amd64.deb 404 Not Found [IP: 2600:3404:200:237::2 80]
E: Failed to fetch http://ftp.us.debian.org/debian/pool/main/libo/libopenmpt/libopenmpt0_0.2.7386~beta20.3-3_amd64.deb 404 Not Found [IP: 2600:3404:200:237::2 80]
E: Failed to fetch http://ftp.us.debian.org/debian/pool/main/f/ffmpeg/libavformat57_3.2.5-1_amd64.deb 404 Not Found [IP: 2600:3404:200:237::2 80]
E: Failed to fetch http://ftp.us.debian.org/debian/pool/main/libr/libraw/libraw15_0.17.2-6+b1_amd64.deb 404 Not Found [IP: 2600:3404:200:237::2 80]
E: Failed to fetch http://ftp.us.debian.org/debian/pool/main/f/ffmpeg/libswscale4_3.2.5-1_amd64.deb 404 Not Found [IP: 2600:3404:200:237::2 80]
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
#
The packages it tried to install are not only for Gimp. Are probably for all things installed before as broken packages.
1. What should I do to fix that?
Now, to make a second related question. I found a thread otherwhere about Ubuntu saying this:
apt-get now supports a 'mirror' method that will automatically select a good mirror based on your location. Putting:
deb mirror://mirrors.ubuntu.com/mirrors.txt precise
main restricted universe multiverse
deb mirror://mirrors.ubuntu.com/mirrors.txt precise-updates main restricted
universe multiverse
deb mirror://mirrors.ubuntu.com/mirrors.txt precise-backports main restricted
universe multiverse
deb mirror://mirrors.ubuntu.com/mirrors.txt precise-security main restricted
universe multiverse
on the top in your /etc/apt/sources.list file should be all that is needed to make it automatically pick a mirror for you based on your geographical location.
Lucid (10.04), Maverick (10.10), Natty (11.04), And Oneiric (11.10) users can replace precise with the appropriate name.
2. Is this something I should do in Debian? Is it possible? But it will not fix my problem, will it?
Edit: note that the 404 errors are *not* for all files. Most of them were downloaded normally. Only a few packages that were dependencies for the last few programs installed were not being found there.
Distribution: Debian /Jessie/Stretch/Sid, Linux Mint DE
Posts: 5,195
Rep:
It should not give 404 errors. You can try to replace the mirror in your sources.list with http://httpredir.debian.org/debian/. This will select a suitable mirror for you.
There are also a number of packages pulled in by --fixed-missing which are dependencies for other programs. Once a dependency is not satisfied, apt will try to fix this every time you run apt. So it does not have anything to do with Gimp.
Now these packages are from the main pool. However, if you are not super concerned that everything is GPL-ed according to Debian, add contrib and non-free to your all deb lines in sources.list. For example:
Code:
deb http://httpredir.debian.org/debian/ stretch main contrib non-free
These two corrections might or might not solve your problems. It simply should not happen. If you only gave the main pool in your sources.list, apt should report that packages are not available. Not that mirrors cannot be reached.
No, I have never updated with those commands, nor with something inside Synaptic (which I also use a lot).
The error I showed has something to give a hint about "apt-get update" is needed?
After changing the mirror used, but not touching the lines with security.debian.org, the result was the same (I expected that it would be). Then I did the 'apt-get update'.
After that, I tried to install (history helped, haha) a package and (of course) it complained about the broken things. But 'apt --fix-broken install' ended well this time.
Thank you both very much! (I still expect an answer to the question I did before in this post)
Distribution: Debian /Jessie/Stretch/Sid, Linux Mint DE
Posts: 5,195
Rep:
Quote:
Originally Posted by dedec0
Just curious: how did you find that URL?
I have no idea, honestly. I think I read it somewhere in some article in the time I had problems selecting an appropriate mirror years ago. I use it since then. There are several utilities to find the best mirror, but those are obsolete by now as it seems. I tried to find a Debian page for you mentioning the use of httpredir and I can't even find it. There are some articles mentioning this site. But you only find them if you know that you have to look for httpredir.
Strange that you could not find. Searching directly for the URL, with quotes added to force better results, I found a few. A few Debian wiki pages mention it, and mailing lists too.
But I do not understand everything these things say.
Debian Wiki: SourcesList now gives an example which is the exact sources.list I would make now. Good thing, right? The only "differences" mine would have is that the two security lines are in the end - no difference, I assume - and the comments I keep.
Try to force IPv4. If that fixes the issue, I would either make the change persistent as the link shows, or try to use backup IPv6 DNS, like Google:
2001:4860:4860::8888
2001:4860:4860::8844
seasons, the issue does not seem the same. The 404 errors were for just a few files. Most worked normally. And the issue was fixed with the 'apt-get update'. The changes I did to source.list file were just something extra.
Timothy, if that is all there was to understand, then it was clear enough for everyone, I assume. (: As jlinkels said before, I just miss a Debian page about what should be used.
Edited the first post to say that the 404 errors were not for everything or for the server itself. They were just for a few "lucky" packages or dependencies.
seasons, the issue does not seem the same. The 404 errors were for just a few files. Most worked normally. And the issue was fixed with the 'apt-get update'. The changes I did to source.list file were just something extra.
Timothy, if that is all there was to understand, then it was clear enough for everyone, I assume. (: As jlinkels said before, I just miss a Debian page about what should be used.
I meant an easier documentation, not the purely technical things that are not much useful to me, for example. I did read deb.debian.org but it does not ring anything explicit to me. If I had read there just as an eventual Debian page, I would not think about changing anything in the machine I use.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.