Fix Broken Packages First

All Gurus once were Newbies
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. Please stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions prefer the other forums within the support section.
Before you post please read this

Fix Broken Packages First

Postby tlcmd on Thu Jan 05, 2012 10:25 pm

Assistance would be appreciated. I did search and didn't find anything posted on this forum
I've installed LMDE and have 1473 updates which will not install because I need to "fix broken packages first." I go to package manager and cannot find broken packages UNLESS those packages marked with an orange circle are the broken ones. Under "edit" "fix broken packages does nothing.
Where do i go from here?
Thanks,
Dick
tlcmd
Level 3
Level 3
 
Posts: 118
Joined: Sat Jan 30, 2010 4:43 pm

Linux Mint is funded by ads and donations.
 

Re: Fix Broken Packages First

Postby Roken on Thu Jan 05, 2012 10:37 pm

Open a terminal (it's in the accessories menu) and run :

Code: Select all
sudo apt-get install -f


Post back any error messages.
Kernel Linux Tex 3.2.2-1 (64 bit) xfce , burg
Arch
ATI Radeon HD 4670, 1GB
OSS4
AMD Phenom II X4 (965BE) @ 3.6 Ghz (Overclocked)
8Gb RAM
Image
User avatar
Roken
Level 5
Level 5
 
Posts: 747
Joined: Fri Nov 19, 2010 4:55 pm
Location: Oldham, UK

Re: Fix Broken Packages First

Postby tlcmd on Mon Jan 09, 2012 12:03 am

Thank You.
tlcmd
Level 3
Level 3
 
Posts: 118
Joined: Sat Jan 30, 2010 4:43 pm

Re: Fix Broken Packages First

Postby jimbobert94 on Sat Mar 10, 2012 7:12 pm

I have the same problem, but got this error after entering "Y":

Can't exec "locale": No such file or directory at /usr/share/perl5/Debconf/Encoding.pm line 16.
Use of uninitialized value $Debconf::Encoding::charmap in scalar chomp at /usr/share/perl5/Debconf/Encoding.pm line 17.
Preconfiguring packages ...
dpkg: warning: 'ldconfig' not found in PATH or not executable.
dpkg: error: 1 expected program not found in PATH or not executable.
Note: root's PATH should usually contain /usr/local/sbin, /usr/sbin and /sbin.
E: Sub-process /usr/bin/dpkg returned an error code (2)
jimbobert94
Level 1
Level 1
 
Posts: 1
Joined: Sat Mar 10, 2012 7:08 pm

Re: Fix Broken Packages First

Postby widget on Sun Mar 11, 2012 7:42 pm

jimbobert94 wrote:I have the same problem, but got this error after entering "Y":

Can't exec "locale": No such file or directory at /usr/share/perl5/Debconf/Encoding.pm line 16.
Use of uninitialized value $Debconf::Encoding::charmap in scalar chomp at /usr/share/perl5/Debconf/Encoding.pm line 17.
Preconfiguring packages ...
dpkg: warning: 'ldconfig' not found in PATH or not executable.
dpkg: error: 1 expected program not found in PATH or not executable.
Note: root's PATH should usually contain /usr/local/sbin, /usr/sbin and /sbin.
E: Sub-process /usr/bin/dpkg returned an error code (2)

Entering Y after what command?

If "sude apt-get -f install" try;
Code: Select all
sudo dpkg --configure -a

Which I think should be run first in any case.
Dell XPS 420 Core2 Quad Q 6600, audigy5.1, Radeon HD 6450 - currently 4 320Gb HDD, Debian Squeeze for secure use, Debian testing for daily use, Debian Sid for fun.
widget
Level 3
Level 3
 
Posts: 167
Joined: Thu May 14, 2009 2:49 am
Location: S.E. Montana

Re: Fix Broken Packages First

Postby josephpmh on Thu Mar 15, 2012 10:28 am

I'm having this same problem.

I've reinstalled (thinking perhaps Lisa KDE was the problem) several times (now running Lisa 64-bit g3). I tried to dist-upgrade but got the ldconfig not in path message. Tried to fix with dpkg and with synaptic package manager. tried to visudo sudousers. Tried to install (reinstall?) libc6:

Code: Select all
aptitude download libc6
dpkg-deb -x libc6*.deb libc6-unpacked/
sudo cp libc6-unpacked/sbin/ldconfig* /sbin


I didn't need to go further as the extracted deb didn't contain ldconfig*. Tried to install using GDebi package installer, but that required the broken dependencies to work, and that brings us back to step one.

Tried to reinstall the distro (separate partition for /home)

The current output of
Code: Select all
sudo apt-get -f install
:

Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following extra packages will be installed:
libc-bin libc-dev-bin libc6 libc6-dev libcurl3 libnss3-1d
Suggested packages:
glibc-doc
The following NEW packages will be installed:
libc-bin libcurl3 libnss3-1d
The following packages will be upgraded:
libc-dev-bin libc6 libc6-dev
3 upgraded, 3 newly installed, 0 to remove and 370 not upgraded.
1 not fully installed or removed.
Need to get 0 B/8,042 kB of archives.
After this operation, 4,121 kB of additional disk space will be used.
Can't exec "locale": No such file or directory at /usr/share/perl5/Debconf/Encoding.pm line 16.
Use of uninitialized value $Debconf::Encoding::charmap in scalar chomp at /usr/share/perl5/Debconf/Encoding.pm line 17.
Preconfiguring packages ...
dpkg: warning: 'ldconfig' not found in PATH or not executable.
dpkg: error: 1 expected program not found in PATH or not executable.
Note: root's PATH should usually contain /usr/local/sbin, /usr/sbin and /sbin.Reading package lists... Done
E: Sub-process /usr/bin/dpkg returned an error code (2)


Any help?

Hardware specs:
modified Dell Inspiron e1505 (Core2Duo T7200)
-Version-
Kernel : Linux 3.0.0-12-generic (x86_64)
Compiled : #20-Ubuntu SMP Fri Oct 7 14:56:25 UTC 2011
C Library : Unknown
Default C Compiler : GNU C Compiler version 4.6.1 (Ubuntu/Linaro 4.6.1-9ubuntu3)
Distribution : Linux Mint 12 Lisa
josephpmh
Level 1
Level 1
 
Posts: 6
Joined: Wed Dec 07, 2011 10:50 pm
Location: Kensington, MD

Re: Fix Broken Packages First

Postby widget on Fri Mar 16, 2012 3:22 am

Run;
Code: Select all
sudo dpkg --clear-avail

and then
Code: Select all
apt-get update

then try your commands again. May help.
Dell XPS 420 Core2 Quad Q 6600, audigy5.1, Radeon HD 6450 - currently 4 320Gb HDD, Debian Squeeze for secure use, Debian testing for daily use, Debian Sid for fun.
widget
Level 3
Level 3
 
Posts: 167
Joined: Thu May 14, 2009 2:49 am
Location: S.E. Montana

Re: Fix Broken Packages First

Postby oldcat on Sun Mar 25, 2012 10:52 am

I'm having pretty much the same problem. I have just installed LMDE 201109 on the computer described below:

Acer TravelMate TM5542-3590 LX.TZG03.010 Notebook, AMD Athlon II Dual-Core P340 2.20GHz, 32-bit, 2GB RAM and 250 GB HD.

The installation went well and I downloaded and installed 430 or so updates. Now I need to get package 3 installed but before I do, there are some issues I think must be taken care of. After installing all those updates, I am getting a notification that I need to download and install another 159 (193 MB) updates. But they won't download. I keep getting the following errors:

An error occurred
[ white horizontal line within red circle ]
E: /var/cache/apt/archives/gstreamer0.10-plugins-
bad_0.10.22-3_i386.deb: trying to overwrite '/usr/lib/
gstreamer-0.10/libgstxvid.so', which is also in package
gstreamer0.10-plugins-really-bad 0.10.22-0.1
[ close ]

and...

Update is complete
[ white horizontal line within red circle ]
Not all changes and updates succeeded. For further details
of the failure, please expand the 'Details' panel below.
[ close ]

This is a loop. I cannot seem to get out of it. Can anyone help and if so, what further info do you need?
oldcat
Level 1
Level 1
 
Posts: 31
Joined: Fri Jun 17, 2011 6:36 am
Location: SW Mississippi

Re: Fix Broken Packages First

Postby zerozero on Sun Mar 25, 2012 12:17 pm

oldcat,
open a terminal and
Code: Select all
sudo dpkg -i --force-overwrite /var/cache/apt/archives/gstreamer0.10-plugins-bad_0.10.22-3_i386.deb
now you can finish the updates
User avatar
zerozero
Level 16
Level 16
 
Posts: 6303
Joined: Tue Jul 07, 2009 2:29 pm

Re: Fix Broken Packages First

Postby oldcat on Sun Mar 25, 2012 1:04 pm

Thank you very much, zerozero. It worked and I was able to get the install completed. Now I'm trying to analyze what I did since, in the past, I have gotten such errors in Linux Mint when downloading updates. I know that 'dpkg' is the Debian installer and that -i + package name = install the package, and -r + package name = remove the package. The term 'force-overwrite' is self explanatory.

Is this a formula that can be used in all/most such instances, with dpkg -i/-r for Debian and apt-get install/remove for Mint (gnome)?

I am assuming that this completes LMDE update 2 and that the next step is tackling pack 3. Right?

I have read the link http://blog.linuxmint.com/?p=1836. Do I now wait for the system to tell me that I have more updates to install? Pack 3 doesn't seem to be in the package manager. I may as well install it and get it over with since it is going to have to be done sooner or later for LMDE to work properly.
oldcat
Level 1
Level 1
 
Posts: 31
Joined: Fri Jun 17, 2011 6:36 am
Location: SW Mississippi

Re: Fix Broken Packages First

Postby zerozero on Sun Mar 25, 2012 3:45 pm

1- i would only use the force-overwrite in extreme situations (like this was was)
2- this problem arises from a packaging issue: really-bad is maintained by debian-multimedia and bad by debian-proper, in the update the first tries to write a file that also exists on the second (hence the error)
3- regardless of being ubuntu-mint or debian-mint, i would use APT (or one of its GUI like synaptic or mintupdate), and gdebi if i need to install a d/l deb.
4- about UP3 if you have your repos according to this viewtopic.php?f=185&t=82346 and a
Code: Select all
apt update && apt dist-upgrade
doesn't install nothing, you have it :)
User avatar
zerozero
Level 16
Level 16
 
Posts: 6303
Joined: Tue Jul 07, 2009 2:29 pm

Re: Fix Broken Packages First

Postby oldcat on Sun Mar 25, 2012 4:34 pm

Thanks again, zerozero. It looks like I've got it installed. Everything appears to be working just fine and except for that one "force-overwrite" issue, I didn't have any trouble. If I sound surprised, it's because I've read about the many problems others have had with it. After I edited the /etc/apt/sources.list, everything just fell into place and I didn't even realize that the pack-3 was installed. I was fortunate that it worked so well for me. Again, thanks for your help.
oldcat
Level 1
Level 1
 
Posts: 31
Joined: Fri Jun 17, 2011 6:36 am
Location: SW Mississippi

Linux Mint is funded by ads and donations.
 

Return to Newbie Questions

Who is online

Users browsing this forum: No registered users and 4 guests