2

I recently noticed that apt-get update and aptitude update report some errors:

W: Failed to fetch http://linux.dropbox.com/debian/dists/wheezy/main/binary-amd64/Packages: Bad header line
W: Failed to fetch http://ftp.informatik.uni-frankfurt.de/debian/dists/stable/contrib/binary-amd64/Packages: 406  Not Acceptable
W: Failed to fetch http://ftp.informatik.uni-frankfurt.de/debian/dists/stable/non-free/binary-amd64/Packages: 406  Not Acceptable
W: Failed to fetch http://ftp.informatik.uni-frankfurt.de/debian/dists/stable/contrib/binary-i386/Packages: 406  Not Acceptable
W: Failed to fetch http://ftp.informatik.uni-frankfurt.de/debian/dists/stable/non-free/binary-i386/Packages: 406  Not Acceptable
E: Some index files failed to download. They have been ignored, or old ones used instead.
E: Couldn't rebuild package cache

I looked at the server and found out that only Packages.gz and Packages.bz2, but not Packages exist. This also happens on the main server, not only on ftp.informatik.uni-frankfurt.de.

After some research I found out that all mirors recently updated to only contain the Packages file in an compressed format but no longer plain. How can I tell apt-get and/or aptitude to use the compressed files instead the plain ones?

This is my sources.list (I've edited it, but it worked before):

#deb http://ftp.de.debian.org/debian/ stable main contrib non-free
#deb-src http://ftp.de.debian.org/debian/ stable main
deb http://ftp.informatik.uni-frankfurt.de/debian/ stable main contrib non-free

deb http://security.debian.org/ stable/updates main contrib
deb-src http://security.debian.org/ stable/updates main contrib

# wheezy-updates, previously known as 'volatile'
#deb http://ftp.de.debian.org/debian/ stable-updates main contrib
#deb-src http://ftp.de.debian.org/debian/ stable-updates main contrib
deb http://ftp.informatik.uni-frankfurt.de/debian/ stable-updates main contrib

deb http://downloads.sourceforge.net/project/ubuntuzilla/mozilla/apt all main

#deb http://ftp.de.debian.org/debian/ wheezy-backports main contrib non-free
deb http://ftp.informatik.uni-frankfurt.de/debian/ wheezy-backports main contrib non-free

#deb http://ftp.de.debian.org/debian/ jessie main contrib non-free
deb http://ftp.informatik.uni-frankfurt.de/debian/ unstable main contrib non-free

In /etc/apt/sources.list.d are the following files:

  • apt-build.list

    # deb file:/var/cache/apt-build/repository/ apt-build main
    
  • dropbox.list

    deb [arch=i386,amd64] http://linux.dropbox.com/debian wheezy main
    
  • google-chrome.list

    ###
    ### THIS FILE IS AUTOMATICALLY CONFIGURED ###
    # You may comment out this entry, but any other modifications may be lost.
    deb http://dl.google.com/linux/chrome/deb/ stable main
    
  • Can you post your sources.list in the question, please? Also check /etc/apt/sources.list.d/ for additional sources. – Faheem Mitha Jan 2 '15 at 14:38
  • @FaheemMitha I added the files you requested, can you help me now? – msrd0 Jan 2 '15 at 15:12
  • Sorry, I could not reproduce your issue with those urls. You wrote "only Packages.gz and Packages.bz2, but not Packages exist." what server are you referring to? Can you show a url where Packages does not exist? In any case, if the problem persists, I suggest first try removing /var/lib/apt/lists/partial/ and if that doesn't work, switch servers. – Faheem Mitha Jan 2 '15 at 17:06
  • @FaheemMitha ftp.informatik.uni-frankfurt.de/debian/dists/stable/main/… and ftp.de.debian.org/debian/dists/stable/main/binary-amd64 both don't contain Packages (at least when I visit them using my browser) – msrd0 Jan 2 '15 at 17:10
  • You're right,they don't. I'm not sure if that is a problem, though. I'm not seeing any errors here. – Faheem Mitha Jan 2 '15 at 17:22
2

Other bug reports & here say to switch to a different mirror, update, then switch back. Could be caused from the server not supporting partial downloads correctly?

  • Delete partially downloaded files in /var/lib/apt/lists/partial/ should work, then try an update again.

Apparently some change to apt or dpkg, hopefully fixed with a newer upstream version.

Otherwise, it sounds like you might be using an old version (or buggy version) of apt that can't handle the compressed files. Is your system very old or not updated in a long time? There may be an updated version of apt you could try by manually browsing your repos (stable or stable-updates would be best, sticking to whatever is default/supported for your distro should give the best results) and download an updated apt .deb and install it with dpkg, since it appears your apt may be unable to do so itself.

Or, if you've recently udpated apt, then downgrading it to the previous version that was working yesterday or last week might work too.

  • I normally check for updates and install them at least every week and I had ftp.de.debian.org before and then changed to ftp.informatik.uni-frankfurt.de, but it didn't help. – msrd0 Jan 2 '15 at 17:01
  • The linked bug report indicates the error can happen with several servers, trying a few different ones around the world might help. Or deleting any partial files? – Xen2050 Jan 2 '15 at 17:15
  • Thanks, the apt package from Debian Jessie works, I've upgraded it now – msrd0 Jan 2 '15 at 17:21
  • @msrd0 That's good news, if any answers were helpful you could upvote some, select/check-mark one that worked – Xen2050 Jan 2 '15 at 17:47
  • That's not really new to me, I know how StackExchange works. But I solved the problem by upgrading apt and I need to wait 2 days until I can accept my own answer; and no other answer provided a way how I could resolve it – msrd0 Jan 2 '15 at 19:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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