APT-cache damaged since update to linux Mint 17.3

Bug #1530809 reported by Wiebke Graf
14
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Linux Mint
Confirmed
Undecided
Unassigned

Bug Description

Recently I upgraded my perfectly working linux Mint 17.2 to 17.3 (both cinnamon 64 bit), due to enjoy these new features making work easier. Ever since I can't update my software. There's popping up a warning, which says to switch to another linux mint mirror because of a damaged ATP-cache. Living in Germany I tried almost every mirror of my country, even some of the Netherlands and Czech Republic. But it doesn't work and the warning comes again. Even the reset to the original mirrors doesn't work.
What can I do to get the latest updates again, how can I fix this problem?

description: updated
Revision history for this message
Christian Assig (chrassig) wrote :

I had the same problem after upgrading from Mint 17.2 to 17.3 (Cinnamon and German language as in your case, difference: 32 bit in my case).

I was able to make the error message disappear by running the following two commands in Terminal:
sudo aptitude update
sudo aptitude full-upgrade

The second command asked me a few questions about differences in configuration files (e.g. /etc/issue and /etc/issue.net). I answered Y to all of them to install the version from the new package as I had not made any changes to these files deliberately.

After both commands had finished successfully, the Linux Mint Update Manager (mintupdate, "Aktualisierungsverwaltung" in German) was running fine again.

Revision history for this message
Wiebke Graf (wiebke-graf) wrote :

Thanks Christian! Your solution worked perfectly!!!

Changed in linuxmint:
status: New → Confirmed
status: Confirmed → Fix Released
status: Fix Released → Fix Committed
Changed in linuxmint:
status: Fix Committed → Confirmed
Revision history for this message
Christian Assig (chrassig) wrote :

Today the original error message re-appeared on my Mint installation.

I found out that this is the original error message:
"Your APT cache is corrupted.
Do not install or update anything, it could break your operating system!
Switch to a different Linux Mint mirror to solve this situation."

See https://github.com/linuxmint/mintupdate/blob/master/usr/lib/linuxmint/mintUpdate/mintUpdate.py
currently line 682.

The source of mintUpdate.py pointed me to apt sources with priority 700. I found out that the file /etc/apt/preferences.d/official-package-repositories.pref was missing on my machine. I did not delete it myself, it must have been deleted automatically during the upgrade from 17.2 to 17.3 or shortly afterwards by the system.

I copied the contents of the file from https://forum.linuxmint.net.tr/index.php?topic=4963.15 and hope to have repaired my installation now. However, I hope someone can investigate why the file went missing in the first place.

The official source of official-package-repositories.pref contains the same content.
https://github.com/linuxmint/mintsystem/blob/master/usr/share/linuxmint/mintsystem/apt/official-package-repositories.pref

So if somebody is still affected by this bug, I suggest you recreate the file /etc/apt/preferences.d/official-package-repositories.pref, either by downloading it:
sudo wget https://raw.githubusercontent.com/linuxmint/mintsystem/master/usr/share/linuxmint/mintsystem/apt/official-package-repositories.pref -O /etc/apt/preferences.d/official-package-repositories.pref

Or, if /usr/share/linuxmint/mintsystem/apt/official-package-repositories.pref still exists on your system, simply execute:
sudo cp /usr/share/linuxmint/mintsystem/apt/official-package-repositories.pref /etc/apt/preferences.d/official-package-repositories.pref

Afterwards, run the Linux Mint Update Manager again and try to update your system.

Revision history for this message
Steve Roberts (drgrumpy) wrote :

I just ran into this issue. The fix above did not correct it.

Revision history for this message
Eric (emwine) wrote :

I hit this when my DNS wasn't working. Mirrors couldn't be resolved, and lots of errors and hit this using the proposed solutions Mint gave. (select alternative mirrors, refresh, try again)

I would have resolved this on my own if the error messages has even remotely hinted at DNS issue or failure to resolve the mirror.

Revision history for this message
nozyczek (nozyczek) wrote :

Make sure to:
sudo chmod 644 /etc/apt/sources.list.d/*

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.