[solved]fix broken pakage

Questions about applications and software
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
godsotherhand

[solved]fix broken pakage

Post by godsotherhand »

when i press install updates, it says
Could not apply changes
fix broken packages first

how do i do that? how do i know what to do?
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 2 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
lmintnewb

Re: fix broken pakage

Post by lmintnewb »

lol ... you seem to have the best luck with Mint issues without a doubt. Could try opening synaptic>custom filters ( lower left corner ) ... See if it lists any broken packages when you click on the menu item broken packages. If it does, right click on them and mark for reinstall etc.
aeternal

Re: fix broken pakage

Post by aeternal »

If there are not broken packages in synaptic but you still are unable to update (i.e you still get the fix broken packages first error)

You my try to update from Terminal:

open menu > accessories > terminal and type:

Code: Select all

sudo apt-get update && apt-get upgrade && apt-get dist-upgrade
It may require a few time, sometimes it will ask you if change or not some files, always type y if it asks you.
godsotherhand

Re: fix broken pakage

Post by godsotherhand »

E: Could not open lock file /var/lib/dpkg/lock - open (13: Permission denied)
E: Unable to lock the administration directory (/var/lib/dpkg/), are you root?


thats what is says when i rug the comand to update from the terminal.
Also, synaptic says there are no broken packages.
what's next? :-s

yes, this is the admin acount.. also, weird stuff is..it didnt ask me for password after pressing enter in the terminal.. (ran mintupdate before..maybe thats why? dunno..)
zerozero

Re: fix broken pakage

Post by zerozero »

enter the command like this

Code: Select all

sudo apt-get update && sudo apt-get dist-upgrade
now it should work
godsotherhand

Re: fix broken pakage

Post by godsotherhand »

ty very much. could any1 please tell me what could the problem have been? and way the 1st command didnt work?
Just curious, and want to learn abit whats going on "under the hood" :p
zerozero

Re: fix broken pakage

Post by zerozero »

what could have been is hard to say: a multitude of things, but basically the inability of MU to deal with some dependence-loops (yet);
sometimes pkg x requires pkg y, but pkg y is incompatible with x and z depends on x and y to be updated, on this scenario MU flips out and gives you that error "fix broken packages", synaptic and apt are more mature and deal better with dependence problems - don't know if i explained it well enough :oops:

regarding

Code: Select all

sudo apt-get update && apt-get upgrade && apt-get dist-upgrade
you're lacking the sudo before the second and third command, so they won't be run as root, as those actions need root permissions to be run;
furthermore, you don't need to run upgrade and after dist-upgrade, because the last command already performs the former
$ man apt-get

upgrade
upgrade is used to install the newest versions of all packages currently installed on the system from the
sources enumerated in /etc/apt/sources.list. Packages currently installed with new versions available are
retrieved and upgraded; under no circumstances are currently installed packages removed, or packages not
already installed retrieved and installed. New versions of currently installed packages that cannot be upgraded
without changing the install status of another package will be left at their current version. An update must be
performed first so that apt-get knows that new versions of packages are available.

dist-upgrade
dist-upgrade in addition to performing the function of upgrade, also intelligently handles changing
dependencies with new versions of packages; apt-get has a "smart" conflict resolution system, and it will
attempt to upgrade the most important packages at the expense of less important ones if necessary. The
/etc/apt/sources.list file contains a list of locations from which to retrieve desired package files. See also
apt_preferences(5) for a mechanism for overriding the general settings for individual packages.
godsotherhand

Re: fix broken pakage

Post by godsotherhand »

ty very much. I got it! well explained :D
Locked

Return to “Software & Applications”