Page 1 of 1

[RESOLVED]Could not apply Changes! Fix broken packages first

Posted: Mon Dec 20, 2010 8:18 am
by muzzwood
Hi,

Today I attempted to use mint update and I can refresh the packages no problem, but when I click install updates I get the following error in a pop-up box: "Could not apply Changes! Fix broken packages first."

I went into synaptic and attempted to fix broken packages and it said it was successfully done but the same problem occurs. I booted up my laptop which also runs LMDE and I'm getting the same problem.

Anyone have any ideas what might be causing this? Oh, I also tried deselecting all my software sources except for the main one but still the same thing..

Thanks in advance,
Muzz

Re: Update: Could not apply Changes! Fix broken packages fir

Posted: Mon Dec 20, 2010 8:33 am
by anzan
Yes.
Because of a problem in mintdesktop 3.2.1, you’ll need to run the following commands to ensure a smooth upgrade:

apt update
sudo rm /var/lib/dpkg/info/mintdesktop.prerm
apt install mintdesktop
This hiccup with mintdesktop is fixed in the version you’re upgrading to and a reminiscence of the previous version. Please accept our apologies for this little problem.
http://blog.linuxmint.com/


This will clear the problem.

Re: Update: Could not apply Changes! Fix broken packages fir

Posted: Mon Dec 20, 2010 9:09 am
by muzzwood
Hi,

I had already done that last time I updated and it worked then but I didn't realise I would have to do that each time....
Just tried it and it didn't work unfortunately.

# apt update
Hit http://security.debian.org testing/updates Release.gpg
Ign http://security.debian.org/ testing/updates/contrib Translation-en
Ign http://security.debian.org/ testing/updates/contrib Translation-en_GB
Hit http://ftp.debian.org testing Release.gpg
Ign http://ftp.debian.org/debian/ testing/contrib Translation-en
Ign http://ftp.debian.org/debian/ testing/contrib Translation-en_GB
Hit http://www.lamaresh.net squeeze Release.gpg
Ign http://www.lamaresh.net/apt/ squeeze/main Translation-en
Ign http://www.lamaresh.net/apt/ squeeze/main Translation-en_GB
Get:1 http://packages.linuxmint.com debian Release.gpg [198 B]
Ign http://packages.linuxmint.com/ debian/import Translation-en
Ign http://packages.linuxmint.com/ debian/import Translation-en_GB
Ign http://packages.linuxmint.com/ debian/main Translation-en
Ign http://security.debian.org/ testing/updates/main Translation-en
Ign http://security.debian.org/ testing/updates/main Translation-en_GB
Ign http://security.debian.org/ testing/updates/non-free Translation-en
Ign http://security.debian.org/ testing/updates/non-free Translation-en_GB
Hit http://security.debian.org testing/updates Release
Hit http://www.debian-multimedia.org testing Release.gpg
Ign http://www.debian-multimedia.org/ testing/main Translation-en
Ign http://www.debian-multimedia.org/ testing/main Translation-en_GB
Ign http://ftp.debian.org/debian/ testing/main Translation-en
Ign http://ftp.debian.org/debian/ testing/main Translation-en_GB
Ign http://ftp.debian.org/debian/ testing/non-free Translation-en
Ign http://ftp.debian.org/debian/ testing/non-free Translation-en_GB
Hit http://ftp.debian.org testing Release
Hit http://security.debian.org testing/updates/main i386 Packages
Ign http://packages.linuxmint.com/ debian/main Translation-en_GB
Ign http://packages.linuxmint.com/ debian/upstream Translation-en
Ign http://packages.linuxmint.com/ debian/upstream Translation-en_GB
Get:2 http://packages.linuxmint.com debian Release [6,532 B]
Hit http://ftp.debian.org testing/main i386 Packages/DiffIndex
Hit http://security.debian.org testing/updates/contrib i386 Packages
Hit http://security.debian.org testing/updates/non-free i386 Packages
Ign http://www.debian-multimedia.org/ testing/non-free Translation-en
Ign http://www.debian-multimedia.org/ testing/non-free Translation-en_GB
Hit http://www.debian-multimedia.org testing Release
Hit http://www.lamaresh.net squeeze Release
Hit http://ftp.debian.org testing/contrib i386 Packages/DiffIndex
Hit http://ftp.debian.org testing/non-free i386 Packages/DiffIndex
Ign http://packages.linuxmint.com debian/main i386 Packages
Ign http://www.lamaresh.net squeeze/main i386 Packages
Hit http://www.debian-multimedia.org testing/main i386 Packages/DiffIndex
Ign http://packages.linuxmint.com debian/import i386 Packages
Ign http://www.lamaresh.net squeeze/main i386 Packages
Hit http://www.debian-multimedia.org testing/non-free i386 Packages/DiffIndex
Ign http://packages.linuxmint.com debian/upstream i386 Packages
Hit http://www.lamaresh.net squeeze/main i386 Packages
Ign http://packages.linuxmint.com debian/main i386 Packages
Ign http://packages.linuxmint.com debian/import i386 Packages
Ign http://packages.linuxmint.com debian/upstream i386 Packages
Hit http://packages.linuxmint.com debian/main i386 Packages
Hit http://packages.linuxmint.com debian/import i386 Packages
Hit http://packages.linuxmint.com debian/upstream i386 Packages
Fetched 6,730 B in 5s (1,197 B/s)
Reading package lists... Done
N: Ignoring file 'opera.list.save' in directory '/etc/apt/sources.list.d/' as it has an invalid filename extension
N: Ignoring file 'boxee.list.save' in directory '/etc/apt/sources.list.d/' as it has an invalid filename extension
N: Ignoring file 'google-chrome.list.save' in directory '/etc/apt/sources.list.d/' as it has an invalid filename extension


# sudo rm /var/lib/dpkg/info/mintdesktop.prerm
rm: cannot remove `/var/lib/dpkg/info/mintdesktop.prerm': No such file or directory

# apt install mintdesktop
Reading package lists... Done
Building dependency tree
Reading state information... Done
mintdesktop is already the newest version.
The following package was automatically installed and is no longer required:
icoutils
Use 'apt-get autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 72 not upgraded.
N: Ignoring file 'opera.list.save' in directory '/etc/apt/sources.list.d/' as it has an invalid filename extension
N: Ignoring file 'boxee.list.save' in directory '/etc/apt/sources.list.d/' as it has an invalid filename extension
N: Ignoring file 'google-chrome.list.save' in directory '/etc/apt/sources.list.d/' as it has an invalid filename extension

Re: Update: Could not apply Changes! Fix broken packages fir

Posted: Mon Dec 20, 2010 9:34 am
by kwevej
you don't need to do that each time

Re: Update: Could not apply Changes! Fix broken packages fir

Posted: Mon Dec 20, 2010 11:10 am
by muzzwood
Yeah that's what I had assumed. :)

Unfortunately I'm not sure where to go from here...

Re: Update: Could not apply Changes! Fix broken packages fir

Posted: Mon Dec 20, 2010 3:28 pm
by kruijf
Copy paste this in the terminal: sudo apt-get update && sudo apt-get upgrade && sudo apt-get dist-upgrade

That worked for me.

Re: Update: Could not apply Changes! Fix broken packages fir

Posted: Mon Dec 20, 2010 5:22 pm
by kwevej
just delete all the .save files under /etc/apt/sources.list.d/

Re: Update: Could not apply Changes! Fix broken packages fir

Posted: Mon Dec 20, 2010 9:39 pm
by ukbrian
Thank you anzan your solution worked for me :D
anzan wrote:

Code: Select all

apt update
sudo rm /var/lib/dpkg/info/mintdesktop.prerm
apt install mintdesktop
ukbrian

Re: Update: Could not apply Changes! Fix broken packages fir

Posted: Tue Dec 21, 2010 1:38 am
by SLinovitz
Got the same error. This error happened after mint-update froze while installing the following:

<mintupdate.history log>
20 Dec 2010 19:23:31 libdiscover2 3 2.1.2-4 2.1.2-5
20 Dec 2010 19:23:31 discover 3 2.1.2-4 2.1.2-5

The OS didn't freeze just mint-update. Wasn't able to kill the process and the computer finally froze while trying to shutdown. After the reboot I got the broken package error.

<Mintupdate gave the following message:>
E: dpkg was interrupted, you must manually run 'sudo dpkg --configure -a' to correct the problem.
E: _cache->open() failed, please report.

After the running 'sudo dpkg --configure -a', mintupdate gave the message to use the broken package filter.

I used Synaptic > Edit > Fix Broken Packages > Apply and the two packages above were sucessfully installed.

Mint-update seems to be working fine now.

Re: Update: Could not apply Changes! Fix broken packages fir

Posted: Tue Dec 21, 2010 1:55 am
by muzzwood
kruijf wrote:Copy paste this in the terminal: sudo apt-get update && sudo apt-get upgrade && sudo apt-get dist-upgrade

That worked for me.


WORKED!
Thanks heaps kruijf :)

Re: [RESOLVED]Could not apply Changes! Fix broken packages f

Posted: Tue Dec 21, 2010 7:06 am
by kruijf
Your welcome i'm glad i could help.

Re: [RESOLVED]Could not apply Changes! Fix broken packages f

Posted: Wed Jan 26, 2011 10:57 pm
by libssd
Returning to this, I am still getting an error whenever I try to run the graphical update manager.

1. I have applied the mintdesktop fix documented by Clem
2. I have checked Synaptic for broken packages (none reported) and despite this, have run Fix Broken Packages

Running the update at the command line always works without errors; the graphical update manager always refuses to run. Obviously, if I can run updates from the CLI, I am able to keep LMDE Julia current; it's just maddening not to be able to resolve the problem with the GUI equivalent.

Re: [RESOLVED]Could not apply Changes! Fix broken packages f

Posted: Wed Jan 26, 2011 11:26 pm
by psych1610
Does my thread sound similar to what you're experiencing?

http://forums.linuxmint.com/viewtopic.php?f=141&t=64892

It only occurs within mintUpdate. Running anything from the terminal is applied successfully. Mine is caused, I believe, by the addition of extra repositories to the system. Specifically Hadrets. I haven't tried anything else though so I can't say for sure.

Re: [RESOLVED]Could not apply Changes! Fix broken packages f

Posted: Wed Jan 26, 2011 11:33 pm
by libssd
psych1610 wrote:Does my thread sound similar to what you're experiencing?

http://forums.linuxmint.com/viewtopic.php?f=141&t=64892

It only occurs within mintUpdate. Running anything from the terminal is applied successfully. Mine is caused, I believe, by the addition of extra repositories to the system. Specifically Hadrets. I haven't tried anything else though so I can't say for sure.
Not using hadrets, and (to the best of my recollection) I haven't enabled any repositories beyond the defaults. I have installed the Google Chrome browser.

Re: [RESOLVED]Could not apply Changes! Fix broken packages f

Posted: Fri Jan 28, 2011 9:48 am
by Shadoglare
Yeah, from reading through the thread this isn't looking all that "resolved" to me :?

I'm getting the same error. I ran the update through the terminal that kruijf suggested, and that worked fine, but after reboot Mint Update is still horking:

Image

...OK, so after the "manual" update, MintUpdate was only showing 8 packages that still needed to be updated, so I tried updating them 1 by 1 until I got the message. AAAaaaaaand it appears the winner of the Broken Package Award goes to: libva1

MintUpdate passes the following in the error context window:
E: libgl1-nvidia-alternatives: subprocess installed post-installation script returned error exit status 2
I tried to get the full text of the data it spewed into the "more details" terminal window but couldn't figure out how to copy & past from it :?

...Now what's weird though is while writing this post I ran "apt-get install libva1" to see if I could get the error text in a format where I could copy/paste... and what happened is it came back with "the newest version is already installed."
And... MintUpdate is now saying I'm fully up to date, showing the green check mark, even after refreshing.
That's just weird.

[Edit]
So SOMETHING is still very broken, even though MintUpdate is giving the green checkmark. This is what I got when I ran "apt-get install leafpad" :
leafpad is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue [Y/n]?
Setting up libgl1-nvidia-alternatives (195.36.31-6) ...
Leaving 'diversion of /usr/lib/libGL.so to /usr/lib/nvidia/diversions/libGL.so by libgl1-nvidia-alternatives'
Leaving 'diversion of /usr/lib/libGL.so.1 to /usr/lib/nvidia/diversions/libGL.so.1 by libgl1-nvidia-alternatives'
Leaving 'diversion of /usr/lib/libGL.so.1.2 to /usr/lib/nvidia/diversions/libGL.so.1.2 by libgl1-nvidia-alternatives'
Processing triggers for libgl1-nvidia-alternatives ...
update-alternatives: error: alternative path /usr/lib/nvidia/diversions/libGL.so.1 doesn't exist.
dpkg: error processing libgl1-nvidia-alternatives (--configure):
subprocess installed post-installation script returned error exit status 2
configured to not write apport reports
Errors were encountered while processing:
libgl1-nvidia-alternatives
E: Sub-process /usr/bin/dpkg returned an error code (1)
So yeah it looks like the package is still broken, and MintUpdate just decided to not complain about it any longer. So how do I un-break this package?