0

I'm running an old Debian 3.1, and I'm trying to run "apt-get update" to no avail. I've read this thread, but neither solution, or the comment section has helped. Going back to the old status file or removing the lists under /var/lib/apt/lists/ gets me back to square one: the first time I run "apt-get update" it starts downloading stuff until eventually the error occurs, and all the subsequent times I try to run any apt-get command (update, install...) I will get the exact same error without all the previous downloading:

Reading package lists... Error!
E: Malformed provides line
E: An error occurred while processing libapt-inst2.0 (NewVersion1)
E: Problem with MergeList /var/lib/apt/lists/ftp.us.debian.org_debian_dists_stable_main_binary-i386_Packages
E: The package lists or status file could not be parsed or opened.

I've read other threads from different forums, which usually suggest removing not all the lists, but just the one causing the problem, or cutting out the package libapt-inst2.0 from the the status file, but there's definitely no such string ("libapt-inst2.0") in /var/lib/dpkg/status - I just need to be able to use apt-get somehow, and it didn't even work before updating. Any help will be appreciated!!

  • If you are really running 3.1, you might want to upgrade to something more recent and actually supported. – Faheem Mitha Dec 29 '17 at 12:13
2

Your sources.list (the list of package repositories) refers to stable, which is now Debian 9 (and hasn’t been Debian 3.1 for ten years) — that error saved your system from a rather messy mix-up if you ever tried upgrading or installing a package!

To fix this, you need to replace stable with sarge (the code name for Debian 3.1):

sed -i s/stable/sarge/g /etc/apt/sources.list

You’ll also need to use an archive containing the older releases; in your case, ftp.us.debian.org would be appropriate:

sed -i sXftp.us.debian.orgXftp.us.debian.org/debian-archiveXg /etc/apt/sources.list

Then apt-get update should work fine again.

0

Thanks so much for your help. I've backed up my sources.list file, which contained this:

deb http://ftp.us.debian.org/debian/ stable main
deb-src http://ftp.us.debian.org/debian/ stable main

deb http://mirrors.kernel.org/debian/ stable main
deb-src http://mirrors.kernel.org/debian/ stable main

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

And then, of course, after running sed it's like this:

deb http://ftp.us.debian.org/debian-archive/debian/ sarge main
deb-src http://ftp.us.debian.org/debian-archive/debian/ sarge main

deb http://mirrors.kernel.org/debian/ sarge main
deb-src http://mirrors.kernel.org/debian/ sarge main

deb http://security.debian.org/ sarge/updates main contrib

However, this is causing trillions of errors everywhere when trying to run apt-get update :( I don't see the point of copying such a long stream of errors here. Any idea how I can fix my sources file for my version of Debian, or where I can read and learn about it? Thanks a million!!!

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.