Synaptic Package Manager error

Quick to answer questions about finding your way around Linux Mint as a new user.
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions use the other forums in the support section.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
Achernar

Synaptic Package Manager error

Post by Achernar »

First post. Hi everyone!

When I open up the Synaptic Package Manager I get the following error:
E: Encountered a section with no Package: header
E: Problem with MergeList /var/lib/apt/lists/packages.linuxmint.com_dists_maya_main_binary-amd64_Packages
E: The package lists or status file could not be parsed or opened.
E: _cache->open() failed, please report.
Could some one please help?

Thanks
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
slider
Level 5
Level 5
Posts: 579
Joined: Wed May 07, 2008 2:08 pm
Location: Sliding around somewhere!

Re: Synaptic Package Manager error

Post by slider »

Hi Achernar and Welcome to Linux Mint Forums!

From the output that you have posted your system is saying that there is an corrupt file in apt/lists.

What we can try first is to just delete that file alone. If nothing else is wrong this should get you fixed up.

If not we can then try deleting them all BUT the partial directory. The other files will be regenerated by running the update command.


Lets proceed if you want:
Please be very careful when running the following commands. Copy and paste OR type them exactly as they are written.
1.
Open a terminal and run

Code: Select all

sudo rm -f /var/lib/apt/lists/packages.linuxmint.com_dists_maya_main_binary-amd64_Packages
which should only delete the offending file as listed in your output
E: Problem with MergeList /var/lib/apt/lists/packages.linuxmint.com_dists_maya_main_binary-amd64_Packages
This may leave behind something else that is broken, but you can try this first.

Then run

Code: Select all

sudo apt-get update
if successful you are done. If not see number 2.


2.
Open a terminal and run

Code: Select all

sudo rm -f /var/lib/apt/lists/*
you should see a warning message like > rm: cannot remove `/var/lib/apt/lists/partial': Is a directory This is expected and wanted in this case. By using the -f switch alone we will force the deletion of all the files without deleting the partial directory that is located inside (which you will need to update with). (*note: the asterisk * in the command syntax acts as a wildcard to represent all of the files located in a directory).

Then run

Code: Select all

sudo apt-get update
Now you should be fixed and ready to go.

Please let us know.

Thanks,

S :)
"In the beginning of a change the patriot is a scarce man, brave and hated and scorned. When his cause succeeds the timid join him for then it costs nothing to be a patriot."
Mark Twain
Achernar

Re: Synaptic Package Manager error

Post by Achernar »

Hi Slider,

Thank you kindly for your insightful reply. Unfortunately, there are still some problems that I will elaborate on. I started with step 1 as you suggested. At the end of the apt-get update process, I had the following errors:
W: GPG error: http://ppa.launchpad.net precise Release: The following signatures were invalid: BADSIG B22A95F88110A93A Launchpad PPA for Bumlebee Project
W: Failed to fetch gzip:/var/lib/apt/lists/partial/packages.linuxmint.com_dists_maya_upstream_binary-amd64_Packages Hash Sum mismatch
W: Failed to fetch gzip:/var/lib/apt/lists/partial/packages.linuxmint.com_dists_maya_import_binary-amd64_Packages Hash Sum mismatch
W: Failed to fetch gzip:/var/lib/apt/lists/partial/packages.linuxmint.com_dists_maya_main_binary-i386_Packages Hash Sum mismatch
W: Failed to fetch gzip:/var/lib/apt/lists/partial/packages.linuxmint.com_dists_maya_upstream_binary-i386_Packages Hash Sum mismatch
W: Failed to fetch gzip:/var/lib/apt/lists/partial/packages.linuxmint.com_dists_maya_import_binary-i386_Packages Hash Sum mismatch
E: Some index files failed to download. They have been ignored, or old ones used instead.
After this I opened up the Synaptic Package Manager again, which generated the same errors as above.

So I did your second suggestion (sudo rm -f /var/lib/apt/lists/* followed by update). At the end of the second update, the following errors were generated:
W: Failed to fetch gzip:/var/lib/apt/lists/partial/packages.linuxmint.com_dists_maya_upstream_binary-amd64_Packages Hash Sum mismatch
W: Failed to fetch gzip:/var/lib/apt/lists/partial/packages.linuxmint.com_dists_maya_import_binary-amd64_Packages Hash Sum mismatch
W: Failed to fetch gzip:/var/lib/apt/lists/partial/packages.linuxmint.com_dists_maya_main_binary-i386_Packages Hash Sum mismatch
W: Failed to fetch gzip:/var/lib/apt/lists/partial/packages.linuxmint.com_dists_maya_upstream_binary-i386_Packages Hash Sum mismatch
W: Failed to fetch gzip:/var/lib/apt/lists/partial/packages.linuxmint.com_dists_maya_import_binary-i386_Packages Hash Sum mismatch
E: Some index files failed to download. They have been ignored, or old ones used instead.
So it seems the GPG error was remedied, but the rest persist. Any further thoughts?

Thank you for your time
squeezy

Re: Synaptic Package Manager error

Post by squeezy »

You sometimes see these type of errors when the repo is updating. Try it again tomorrow, it might just work then.
slider
Level 5
Level 5
Posts: 579
Joined: Wed May 07, 2008 2:08 pm
Location: Sliding around somewhere!

Re: Synaptic Package Manager error

Post by slider »

Hi!

What squeezy said can happen at times, so please follow their advice and try again at a later time.

________________________________________________________________________________________________

If the problem persists we will need to investigate further.

Please post the output of

Code: Select all

inxi -S

Code: Select all

inxi -r
You can safely try the following as long as you are careful as before.

"/var/lib/apt/lists/partial" contains md5sums that are needed for verification purposes. If you feel that yours may be corrupted you can regenerate a new one as follows.

As always please be careful when running deletion commands in the root directory.


Open a terminal an run

Code: Select all

sudo rm -rf /var/lib/apt/lists/*
(**notice that there is an "r" in the command syntax this time that means recursive, which will remove directories as well as files**)

Then

Code: Select all

sudo mkdir -p /var/lib/apt/lists/partial
Then

Code: Select all

sudo apt-get update
What this will do is delete everything in "/var/lib/apt/lists/" directory; create a new "partial" directory; then "update" again, which will regenerate all of the files in "lists" and in "lists/partial/".

Please keep us updated on this issue.

Thanks,

S
"In the beginning of a change the patriot is a scarce man, brave and hated and scorned. When his cause succeeds the timid join him for then it costs nothing to be a patriot."
Mark Twain
Locked

Return to “Beginner Questions”