[solved]fix broken pakage

Questions about mintUpdate
Forum rules
Before you post please read this

[solved]fix broken pakage

Postby godsotherhand on Sat Apr 30, 2011 10:51 am

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 godsotherhand on Sat Apr 30, 2011 6:13 pm, edited 1 time in total.
godsotherhand
Level 4
Level 4
 
Posts: 263
Joined: Tue Mar 22, 2011 12:43 pm

Linux Mint is funded by ads and donations.
 

Re: fix broken pakage

Postby lmintnewb on Sat Apr 30, 2011 10:56 am

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.
lmintnewb
Level 7
Level 7
 
Posts: 1575
Joined: Fri Apr 01, 2011 5:13 pm

Re: fix broken pakage

Postby aeternal on Sat Apr 30, 2011 11:00 am

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.
aeternal
Level 1
Level 1
 
Posts: 29
Joined: Sun Apr 17, 2011 8:46 am

Re: fix broken pakage

Postby godsotherhand on Sat Apr 30, 2011 4:40 pm

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..)
godsotherhand
Level 4
Level 4
 
Posts: 263
Joined: Tue Mar 22, 2011 12:43 pm

Re: fix broken pakage

Postby zerozero on Sat Apr 30, 2011 5:08 pm

enter the command like this
Code: Select all
sudo apt-get update && sudo apt-get dist-upgrade

now it should work
User avatar
zerozero
Level 16
Level 16
 
Posts: 6302
Joined: Tue Jul 07, 2009 2:29 pm

Re: fix broken pakage

Postby godsotherhand on Sat Apr 30, 2011 5:14 pm

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
godsotherhand
Level 4
Level 4
 
Posts: 263
Joined: Tue Mar 22, 2011 12:43 pm

Re: fix broken pakage

Postby zerozero on Sat Apr 30, 2011 5:55 pm

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.
User avatar
zerozero
Level 16
Level 16
 
Posts: 6302
Joined: Tue Jul 07, 2009 2:29 pm

Re: fix broken pakage

Postby godsotherhand on Sat Apr 30, 2011 6:12 pm

ty very much. I got it! well explained :D
godsotherhand
Level 4
Level 4
 
Posts: 263
Joined: Tue Mar 22, 2011 12:43 pm

Linux Mint is funded by ads and donations.
 

Return to mintUpdate

Who is online

Users browsing this forum: No registered users and 1 guest