LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu
User Name
Password
Ubuntu This forum is for the discussion of Ubuntu Linux.

Notices


Reply
  Search this Thread
Old 09-23-2011, 11:21 AM   #1
joboy
Member
 
Registered: Jul 2009
Distribution: Debian, Ubuntu, Puppy, Mint
Posts: 646

Rep: Reputation: 7
How to fix broken package


I am testing version 11.10 and got broken package problem when try to install some package, I try to fix it with synaptic but failed with the following message :

E: Unable to correct problems, you have held broken packages.
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.
E: Unable to correct dependencies


What should I do ?
 
Old 09-23-2011, 12:16 PM   #2
andrewthomas
Senior Member
 
Registered: May 2010
Location: Chicago Metro
Distribution: Arch, Gentoo, Slackware
Posts: 1,690

Rep: Reputation: 312Reputation: 312Reputation: 312Reputation: 312
Are you sure that this in not the result of a "partial-upgrade?"

First clean & update

Code:
sudo apt-get clean && sudo apt-get update
Then post the full output of

Code:
sudo apt-get upgrade
 
1 members found this post helpful.
Old 09-23-2011, 12:20 PM   #3
joboy
Member
 
Registered: Jul 2009
Distribution: Debian, Ubuntu, Puppy, Mint
Posts: 646

Original Poster
Rep: Reputation: 7
I am not sure, but yes that fixed the problem thanks.
 
1 members found this post helpful.
Old 09-23-2011, 12:24 PM   #4
andrewthomas
Senior Member
 
Registered: May 2010
Location: Chicago Metro
Distribution: Arch, Gentoo, Slackware
Posts: 1,690

Rep: Reputation: 312Reputation: 312Reputation: 312Reputation: 312
You're welcome.

Glad to be of help.
 
Old 11-16-2011, 12:25 AM   #5
dileep.durgasi
LQ Newbie
 
Registered: Dec 2008
Posts: 2

Rep: Reputation: 0
Does "apt-get clean" will fix the dependency issue or is there any other process to fix dependencies issue on Linux.
 
Old 11-16-2011, 03:55 AM   #6
fortran
Member
 
Registered: Nov 2011
Location: Cairo, Egypt
Distribution: CentOS, RHEL, Fedora
Posts: 300
Blog Entries: 2

Rep: Reputation: 51
Go to synaptic package manager.
Edit > Fix broken Packages.
 
1 members found this post helpful.
Old 11-16-2011, 04:46 AM   #7
widget
Senior Member
 
Registered: Oct 2008
Location: S.E. Montana
Distribution: Debian Testing, Stable, Sid and Manjaro, Mageia 3, LMDE
Posts: 2,628

Rep: Reputation: 497Reputation: 497Reputation: 497Reputation: 497Reputation: 497
Clean is just a way to recover space. From "man apt-get";
Quote:
clean
clean clears out the local repository of retrieved package files. It removes everything but the lock file from
/var/cache/apt/archives/ and /var/cache/apt/archives/partial/. When APT is used as a dselect(1) method, clean is run
automatically. Those who do not use dselect will likely want to run apt-get clean from time to time to free up disk space.
In answer to the OP in this long dead thread they ran that, a good idea particularly in a dev release as there are a lot of upgrades everyday, along with an update. Then an upgrade.

The update/upgrade corrected the dependency problem, probably because the OP used Update Mangler to upgrade a dev system. This is not a good idea. I don't ever use UM as I don't trust it a bit.

If you have a problem along this line with a broken package the first thing to try is, as root;
Code:
dpkg --configure -a
which will try to install any package not properly installed in a gentle way.

If this does not work try, again as root;
Code:
apt-get install -f
no package just the command as written there. This will attempt, with brute force to install the package(s).

If those do not do it you can study the man page for dpkg or ask on the forum as you have a "special" problem. One or the other of the above should do the trick.

That is basically what Synaptic is invoking with its broken package script. It works pretty well but when you have this type of problem sometimes (probably all times) it is a good idea to do this without X running which kind of kills the option of Synaptic.

I assume you are using Ubuntu so just booting to recovery will bring you to a root prompt. You don't even have to use a password due to the wisdom of the fine Ubuntu devs who very helpfully disabled the login for the root prompt. I know that anyone wanting to get into your box will appreciate that thoughtful, helpful attitude toward security.

Just run those commands there. And hope no one gets access to your box because it is wide open. From that prompt it is easy to set a new user or to change the password for the current user.

You might want to put a password in grub to prevent folks from getting to the recovery mode. Will at least slow them down.
 
1 members found this post helpful.
Old 04-28-2012, 02:15 AM   #8
gbra1988
LQ Newbie
 
Registered: Apr 2012
Posts: 1

Rep: Reputation: Disabled
Hi,
I'm also new to ubuntu and I had the same problem with one package.I use Ubuntu 11.10. After days of forums I tried aptitude and worked:

sudo aptitude install [package]

it is better that you are logged as root to function better:

sudo su
aptitude install [package]

Than follow the steps and that's it, you're done.

I hope this helps
 
Old 05-18-2013, 04:08 PM   #9
ionraedt
LQ Newbie
 
Registered: Jan 2009
Location: BE
Distribution: ubuntu
Posts: 4
Blog Entries: 1

Rep: Reputation: 0
How to fix broken package - gstreamer1.0-plugins-bad

I cannot fix the broken "gstreamer1.0-plugins-bad"

1) Trying with synaptic results in Errors:
E: Unable to correct problems, you have held broken packages.
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.
E: Unable to correct dependencies

2) Trying apt-get clean && sudo apt-get update, sudo apt-get upgrade, dpkg --configure -a and apt-get install -f doesn't fix the package, only the message "0 upgraded, 0 newly installed, 0 to remove and 3 not upgraded" is didplayed.

3)Finally, with aptitude, I get this result:

root@ivo-medion17:/home/ivo# apt-get install aptitude gstreamer1.0-plugins-bad
Reading package lists... Done
Building dependency tree
Reading state information... Done
aptitude is already the newest version.
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
gstreamer1.0-plugins-bad : Depends: libgles2-mesa (>= 7.8.1) but it is not going to be installed or
libgles2
E: Unable to correct problems, you have held broken packages.

BTW, libgles2-mesa is also reported broke by synaptic and cannot be installed.
I am really out of ideas now, can somebody help ?
 
Old 05-18-2013, 06:38 PM   #10
widget
Senior Member
 
Registered: Oct 2008
Location: S.E. Montana
Distribution: Debian Testing, Stable, Sid and Manjaro, Mageia 3, LMDE
Posts: 2,628

Rep: Reputation: 497Reputation: 497Reputation: 497Reputation: 497Reputation: 497
If you were trying to install your package using aptitude that is not the command to use at all. Aptitude is not a function for apt-get. It is a package manager.

As root the command would be;
Code:
aptitude install gstreamer1.0-plugins-bad
I would us the purge command first and then try installing with aptitude. This should give you some alternative routes to take. Do not take the first one. For that matter keep refusing all alternatives until it runs out of them. The run the install command again and take the best one you saw out of all of them the first time around.
 
2 members found this post helpful.
Old 05-20-2013, 09:39 AM   #11
ionraedt
LQ Newbie
 
Registered: Jan 2009
Location: BE
Distribution: ubuntu
Posts: 4
Blog Entries: 1

Rep: Reputation: 0
Hi Widget
I followed your instructions.
I used "aptitude install" and chose the second route (not knowing where the other routes would lead to)
Package "gstreamer1.0-plugins-bad" was installed and works !
"Skype" and "Wine" were uninstalled.
I reinstalled Skype (with Ubuntu Software Center) and it works fine with my old settings.
I suppose that reinstalling wine will also be enough to use some old windows progs again.
Thanks again for your help, you're a genius !
 
Old 06-08-2013, 05:45 AM   #12
yoramdavid
LQ Newbie
 
Registered: Jun 2013
Location: Portugal
Distribution: LinuxMint 14 (nadia)
Posts: 1

Rep: Reputation: Disabled
Hi,

I followed this threat to the end but it did not work for me: I am trying to install f4l.
Quote:
sudo apt-get install f4l
Os pacotes a seguir têm dependências não satisfeitas:
f4l : Depende: libqt3-mt (>= 3:3.3.8-b) mas não é instalável
E: Não foi possível corrigir problemas, você tem pacotes mantidos (hold) estragados.
It says it depends on libqt3-mt but is not installable.

I tryed to fix it with synaptic but it failed with the following message :

Quote:
E: Unable to correct problems, you have held broken packages.
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.
E: Unable to correct dependencies
I then tried the following:
Quote:
sudo apt-get clean && sudo apt-get update
Which seemed ok. No errors reported.

Then
Quote:
sudo apt-get upgrade
Which upgraded some packages and reported no errors.

Quote:
sudo dpkg --configure -a
Does nothing visible.

Quote:
sudo apt-get install -f
0 pacotes actualizados, 0 pacotes novos instalados, 0 a remover e 2 não actualizados.
Did not do much.

The command:
Quote:
sudo aptitude install f4l
Only gave me one choice:
Quote:
Os seguintes NOVOS pacotes serão instalados:
f4l{b}
0 pacotes actualizados, 1 novos instalados, 0 para serem removidos e 2 não actualizados.
É preciso obter 369 kB de ficheiros. Depois de desempacotar serão utilizados 1503 kB.
Os seguintes pacotes têm dependências não satisfeitas:
f4l : Depende: libqt3-mt (>= 3:3.3.8-b) o qual é um pacote virtual.
As seguintes acções irão resolver estas dependências:

Manter os seguintes pacotes na sua versão actual:
1) f4l [Não Instalado]



Aceitar esta solução? [Y/n/q?] n

*** Sem mais soluções disponíveis ***
Which means: it installs f4l, it says it has an unsatisfied dependency with libqt3-mt which is a virtual package.
The solution is: Maintain the package on its actual version: f4l.
Then it seems to do something, but f4l does not get installed.

Thanks.
Yoram
 
Old 06-08-2013, 06:43 PM   #13
widget
Senior Member
 
Registered: Oct 2008
Location: S.E. Montana
Distribution: Debian Testing, Stable, Sid and Manjaro, Mageia 3, LMDE
Posts: 2,628

Rep: Reputation: 497Reputation: 497Reputation: 497Reputation: 497Reputation: 497
Quote:
Originally Posted by yoramdavid View Post
Hi,

I followed this threat to the end but it did not work for me: I am trying to install f4l.

It says it depends on libqt3-mt but is not installable.

I tryed to fix it with synaptic but it failed with the following message :



I then tried the following:

Which seemed ok. No errors reported.

Then

Which upgraded some packages and reported no errors.


Does nothing visible.


Did not do much.

The command:

Only gave me one choice:

Which means: it installs f4l, it says it has an unsatisfied dependency with libqt3-mt which is a virtual package.
The solution is: Maintain the package on its actual version: f4l.
Then it seems to do something, but f4l does not get installed.

Thanks.
Yoram
This has nothing to do with the OP (Original Post).

You should start a new thread.

People use forum search when looking for solutions. Threads should, therefore, cover only one subject so that they will be seachable.
 
1 members found this post helpful.
Old 09-20-2013, 02:23 PM   #14
shadotu
LQ Newbie
 
Registered: Sep 2013
Posts: 1

Rep: Reputation: Disabled
Wink fix brokjen packages

had the same problem with vlc on kali linux. solve the problem by purging the offending dependancies
sudo apt-get install purge (broken dependancy goes here)
do that for every dependancy then install the program using
apt-get install (name of program here)
 
Old 01-02-2014, 03:11 PM   #15
sj738
LQ Newbie
 
Registered: Dec 2013
Posts: 1

Rep: Reputation: Disabled
Thumbs up how to fix broken packages

Quote:
Originally Posted by andrewthomas View Post
Are you sure that this in not the result of a "partial-upgrade?"

First clean & update

Code:
sudo apt-get clean && sudo apt-get update
Then post the full output of

Code:
sudo apt-get upgrade
[INDENT] Very helpful! "Old" questions give me new insight, thanks!
 
1 members found this post helpful.
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Fix broken packages ervini LQ Suggestions & Feedback 1 12-18-2010 05:53 PM
Warning--Icedove 2.0.0.0-3 package broken (+fix) David the H. Debian 1 05-25-2007 09:25 AM
Broken Package during upgrade - unable to fix farslayer Debian 6 10-02-2006 11:10 AM
Aptitude--How to fix broken package kkruecke Debian 1 08-29-2006 03:12 PM
synaptic package manager forcing me to delete a broken package mbman Linux - Software 6 04-25-2006 09:30 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu

All times are GMT -5. The time now is 09:47 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration