Click to See Complete Forum and Search --> : This apt-get problem is ridiculous
Strogian
01-26-2002, 05:30 PM
Alright, I've been having this problem for quite a while now: I'm trying to install new stuff in my debian install (just installed it about a week ago) using dselect. I got my sources.list file set up to use the primary U.S. mirrors (couldn't possibly be anything wrong with them, right?). Now, here's what happens all too often: The second package it tries to get (It's always the second, I think -- It may have been the third some time, but I don't recall) gets a "400 bad request" error, so it is skipped. Then, after a bunch of packages have been successfully installed, I get a bunch of "size mismatch" errors at the end. I'm not sure if they all happen at the end, or it just reports it at the end. But anyway, I've only gotten it to work correctly ONCE... (I tried it a bunch of times, didn't work. Then, on the final attempt, it just worked for some reason -- I didn't change the packages to be installed or anything. The packages just decide that they feel like being downloaded, and it worked.) Does anyone have a clue as to why this is happening? I can't believe that this is only my problem. I read someone else post this problem somewhere else, but they didn't really get a good enough answer, either. If this is not a common problem, then the only thing I can think of that could cause it is my ISP.. Any ISP's do something that would cause this?
sarah31
01-26-2002, 05:48 PM
Well, I had troubles with dselect in LibraNet as well. Not source trouble but many packages that I did not want to remove and that I was prompted if I wanted to keep were still removed. I don't like dselcet all that much.
In your case though it sounds like it is obsiouly source trouble. Have you upgraded to a mostly woody system? If you have the apt-get install netselect. This will check for the fastest source location and write it in your sources.list.
For your reference here is my sources.list and I am having zero troubles with it right now:
#Libranet
deb http://libranetlinux.com updates/
#Debian
deb http://http.us.debian.org/debian testing main contrib non-free
#deb-src http://http.us.debian.org/debian testing main contrib non-free
#Debian Non-US
deb http://non-us.debian.org/ woody/non-US main contrib non-free
#deb-src http://non-us.debian.org/ woody/non_US main contrib non-free
#Debian security updates
#deb ftp://security.debian.org/debian-security potato/updates main contrib non-free
#deb-src ftp://security.debian.org/debian-security potato/updates main contrib non-free
#KDE
#deb ftp://kde.debian.net/debian potato main crypto optional qt1apps
#deb-src ftp://kde.debian.net/debian potato main crypto optional qt1apps
note that I have commented out all src's,security, KDE, and Ximian sources with the #. Of course the LibraNet one is not necessary for you.
Try these if you like. Make sure you run apt-get update after any source changes! That will tell you their staus or if any of your enteries need editing because of typing errors.
Syngin
01-26-2002, 05:55 PM
Originally posted by Strogian:
<STRONG>I got my sources.list file set up to use the primary U.S. mirrors (couldn't possibly be anything wrong with them, right?).</STRONG>
I ran into a problem with a primary US server. You could try commenting out the server you're having problems with and see if that fixes things?
Worked for me.
Strogian
01-26-2002, 08:28 PM
Alright, I'm still using potato, but apt-get install netselect did work. But it's not exactly the easiest thing to use (there isn't even a man page for it). I ended up just looking at the debian mirrors list webpage and hand-typed them as parameters to netselect.. But that didn't help me at all, since every server was listed with the same stats. (9999 was one of the stats -- ping maybe? I don't think it was labeled) Anyway, I've got some more data to throw into the diagnosis. :) Apparently, each time I try to [I]nstall, some of the packages downloaded are kept, and some aren't. The ones that are kept will eventually be installed when I've ran [I]nstall enough times to get all of the packages. The others will be downloaded again the next time I [I]nstall. I have no idea how it makes this distinction. The second package downloaded is ALWAYS a "400 bad request," until the very last time I [I]nstall (when there are few enough packages, I guess, to be able to get them all in one final swoop).
sarah31
01-26-2002, 09:16 PM
Have you tried console-apt or deity(the woody version of capt, i believe)? They aren't as punishing as dselect.
Strogian
01-26-2002, 10:38 PM
Nope, I haven't. You think this is a problem with dselect? I can't believe it is, because it doesn't seem like a bug that they could really overlook. :)
scanez
01-26-2002, 10:42 PM
Okay, have you been having this problem all week or just the last few days? What package is it that it stalls on...
Next Note: A lot of times the debian mirrors, even official ones, don't have all the packages they are supposed to because they are still being loaded onto them (onto the servers that is). Sometimes it may take a few days before all the mirrors have everything they are supposed to. The error you are getting probably means that apt-get can't find the package to download, if it just happenend recently, try again tomorrow and give it some time. Or go the actual http/ftp sites with a browser or something and see if the packages are actually there.
Strogian
01-26-2002, 11:20 PM
Well, here's the deal:
It's always the Second package download that gets a "400 bad request" error. Always. It doesn't matter what the package actually is; I will get a "400 bad request" error. (Unless, as previously stated, it just decides to work) So, for example:
[I]nstall #1
Package A downloads
Package B: 400 bad request
Package C downloads
...
Package G downloads
#### bytes downloaded
Failed to Fetch Package B (400 bad request)
Failed to Fetch Package H - size mismatch
...
Failed to Fetch Package M - size mismatch
[I]nstall #2
Package B downloads
Package C: 400 bad request (Yes, this is the same package C that was downloaded before)
Package D downloads
Package F downloads (let's say that it saved Package E, for some reason)
Package G downloads
Package H downloads
--- Errors listed, as before ---
And it goes on like that, until the second download works. Then the rest of the process works too, and I get everything installed. So, this does not look like a server problem either. Unless this is just a really weird coincidence. :)
Strogian
01-26-2002, 11:20 PM
And I hope that made some sense. :)
Strogian
01-27-2002, 01:14 PM
AH! I have found the answer! (well, I still don't know why it didn't work, but I know a very acceptable workaround :)) I had my sources.list set up for http. When I reconfigured it to use ftp exclusively, everything worked perfectly. And now I see another side-effect of using http: When I would download the lists with an apt-get update, (or when downloading a package) it would often just stop downloading for a while, saying "Waiting for File" or something like that. The halts would usually occur at 99%, but not always. I still wonder why it didn't work with http, but I'm content with just using ftp. :)
keating305
01-27-2002, 01:48 PM
I just changed my sources list to reflect sarah31's list. When I do 'apt-get update" I am told "need to get 132 Mb of files" With 'apt-get dist-upgrade', I get "need to get 463 Mb of files". It isn't so much the difference in the size of the download, but what's the advantage? (Remember, I'm on a 56k dialup!) This will decide me if I'm gonna spring for a set of Woody CD's.
scanez
01-27-2002, 02:53 PM
Originally posted by keating305:
<STRONG>I just changed my sources list to reflect sarah31's list. When I do 'apt-get update" I am told "need to get 132 Mb of files" With 'apt-get dist-upgrade', I get "need to get 463 Mb of files". It isn't so much the difference in the size of the download, but what's the advantage? (Remember, I'm on a 56k dialup!) This will decide me if I'm gonna spring for a set of Woody CD's.</STRONG>
I will assume that instead of apt-get update you meant apt-get upgrade...
Both will upgrade your system yes. The difference is in how they handle packages being removed and what not. An upgrade will not remove any packages that are alread installed nor will it install any new packages that you don't already have installed. It will just upgrade those you have installed; if one of these upgrades require that an older packages be removed or a new one be installed, it will not do it and that package will not be upgraded. A dist-upgrade on the other hand will remove and install packages as it wants; if an upgrade requires a new package or that an old be removed, it will do it.
Hope this helps
SC
Edit: So, if you are upgrading from potato to woody, woody to sid, etc...a dist-upgrade would most likely be better. If you are just upgrading packages within potato, woody, etc...it depends.You could always run both with the --simulate option and see what each one would do.
[ 27 January 2002: Message edited by: scanez ]
keating305
01-27-2002, 03:10 PM
Yeah, that was supposed to be 'apt-get upgrade'. Just an old man mind-fart.
What you said clarifies a lot, but as far as running a simulation, as I said, I'm on a 56k dialup and I don't have that many years left.
I'll probably go with 'dist-upgrade', and if I bork it, I'll buy a set of Woody CD's. This whole thing is just a hobby to me. I don't make my living with a computer, so I have "down time" options that lots of folks don't. I figure that I'll learn as much as I can, then be a guru, and distribute little gems of help in exchange for gifts and sexual favors.
scanez
01-27-2002, 03:35 PM
Originally posted by keating305:
<STRONG>Yeah, that was supposed to be 'apt-get upgrade'. Just an old man mind-fart.
What you said clarifies a lot, but as far as running a simulation, as I said, I'm on a 56k dialup and I don't have that many years left.
I'll probably go with 'dist-upgrade', and if I bork it, I'll buy a set of Woody CD's. This whole thing is just a hobby to me. I don't make my living with a computer, so I have "down time" options that lots of folks don't. I figure that I'll learn as much as I can, then be a guru, and distribute little gems of help in exchange for gifts and sexual favors.</STRONG>
No no, the simulation is instantaneous, it won't download the files and then simulate installing them, it simulates EVERYTHING. It will take 2 or 3 seconds ;)
keating305
01-27-2002, 04:10 PM
OK, I guess I just didn't understand. I'll give the simulation a shot later, when the traffic slows down on the ISP I use.
BTW, for those who are interested, sexual favors are GENDER-SPECIFIC!! Please note that, so you won't be dissappointed when I become a Guru.