DebianThis forum is for the discussion of Debian Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I'm trying to fix broken dependencies on my Debian box, but when I do, I get the following errors:
Code:
athlonbox:/home/sienarot# apt-get -f install
Reading Package Lists... Done
Building Dependency Tree... Done
Correcting dependencies... failed.
Sorry, but the following packages have unmet dependencies:
debconf-i18n: Depends: liblocale-gettext-perl but it is not installed
libdbi-perl: Depends: perlapi-5.8.0 but it is not installable
libterm-readkey-perl: Depends: perlapi-5.8.0 but it is not installable
libtext-charwidth-perl: Depends: perlapi-5.8.0 but it is not installable
Depends: perl-base (>= 5.8.0-18) but 5.6.1-8.2 is installed
libtext-iconv-perl: Depends: perlapi-5.8.0 but it is not installable
Depends: perl-base (>= 5.8.0-15) but 5.6.1-8.2 is installed
perl: Depends: perl-base (= 5.8.0-19) but 5.6.1-8.2 is installed
x-window-system-core: Depends: xlibmesa4-gl but it is not installable
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.
E: Unable to correct dependencies
Hi,
You might start out by using the <dpkg -l | less> command to see the condition of the packages on your system. At the very top of this list is a message explaining what the two letters to the far left of each package mean.
Any letters except two small i's ( ii ) indicate that the package has a problem of some sort. It may be being held (as your error message indicates), or it may have somehow failed to be configured, etc.
I believe that one possible solution would be to go through this list, look at each package that is not completely installed, and use
<dpkg --purge (package name)> to get rid of packages that are in trouble, unless you are absolutely sure that you want that package.
This is often time consuming, but I believe it is the best way. The <dselect> program may let you accomplish the same job a little faster, but many people dislike it. Unless you are comfortable with <dselect>, it is possible to get caught up in the same problem you are having now.
If you do this, apt-get may still fail to install a wanted package if you have correctly installed packages that conflict with it. This would be a different problem, though, and I believe would involve you making a choice of what you want.
Originally posted by sienarot Hi all! Hopefully someone can help me out here!!
I'm trying to fix broken dependencies on my Debian box, but when I do, I get the following errors:
Code:
athlonbox:/home/sienarot# apt-get -f install
Reading Package Lists... Done
Building Dependency Tree... Done
Correcting dependencies... failed.
Sorry, but the following packages have unmet dependencies:
debconf-i18n: Depends: liblocale-gettext-perl but it is not installed
libdbi-perl: Depends: perlapi-5.8.0 but it is not installable
libterm-readkey-perl: Depends: perlapi-5.8.0 but it is not installable
libtext-charwidth-perl: Depends: perlapi-5.8.0 but it is not installable
Depends: perl-base (>= 5.8.0-18) but 5.6.1-8.2 is installed
libtext-iconv-perl: Depends: perlapi-5.8.0 but it is not installable
Depends: perl-base (>= 5.8.0-15) but 5.6.1-8.2 is installed
perl: Depends: perl-base (= 5.8.0-19) but 5.6.1-8.2 is installed
x-window-system-core: Depends: xlibmesa4-gl but it is not installable
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.
E: Unable to correct dependencies
Any suggestions as to how I can fix this?
dowmun gives some good answers. One of the things I sometimes do when I run into these kinds of problems is that I try removing, one by one, the packages that the installer is complaining about. I do this by running the command apt-get remove followed by the package name or a list of packages.
On occasion, I've had success with this kind of a situation by using synaptic, a graphical user interface for the packaging system, I find it much easier to use than either dselect or aptitude, and easier to find stuff than having to resort to the individual apt commands. I do still use apt-get at times, but synaptic is very convenient and it seems to be a bit more forgiving than other package front ends. I install it by running the command apt-get install synaptic, then I call it up either from the command line or by adding the synaptic command to my window or desktop manager (it's located at /usr/sbin/synaptic on my system).
See if synaptic helps you get rid of some of the problems. If it doesn't remove the problems, remove the offending libraries, one by one and keep trying. It may be a bit time consuming unless you have a good idea of what to remove, but it will yield better results.
Finally, avoid forcing the installation of packages unless you also know how to get rid of them. I rarely run into such problems when I simply use either apt-get install or the synaptic interface, I'm more likely to have problems if I manually install software using dpkg -i, especially if I force the installation.
They are not installable because they don't exist in your package lists. In fact they (perlapi and xlibmesa4) don't exist in any of the main distributions (stable, testing, unstable). They're probably still in experimental.
Hi,
This would be an excellent time for me to be quiet, but since your problem is how to correct the existing situation, I am going to climb out on a limb. I am pretty sure that masinick and footfrisbee are waiting with chainsaws.
I am not familiar with synaptic. As masinick suggests, that may be the best solution. If using it does not satisify, then you might consider the following.
I believe you may have tricked up your /etc/apt/sources.list (as in switching from stable, to unstable, and then back to stable )
I think this because you have perl-5.6.1 installed, but apt-get seems to want version 5.8.0. Version 5.6.1 is stable, while version 5.8.0 is testing (I think).
Perhaps it might help if you posted the contents of /etc/apt/sources.list
You might consider using the command < dpkg -C > and see what is suggested by the output. This command is supposed to make suggestions about what to do to get the packages fixed.
If you have changed the contents of your sources list recently, it is important to run <apt-get update > to reflect newly available or newer versions of packages.
In order to correct the broken dependency problem, you used < apt-get -f install >. The command < apt-get -f remove > will allow apt-get to try to fix broken dependencies by removing things. I would certainly read about this before doing it.
In response to dowmum, those are very good solutions, but this is a bit of a different circumstance. Those two packages just do not exist. The package maintainers just having got to making them yet, but the dependencies are there. This is a possibility when running the unstable distribution. sienarot's sources.list is most likely just fine.
It seems that my problem is that apt-get wants to use perl-base to install and update programs, but there is a dependancy problem between perl-base and libclass-multimethod-perl so that perl-base cannot update itself and I can't uninstall libclass-multimethod-perl because uninstalling it requires the new perl-base.
(I have a Debian SID/KDE system, has always been on SID)
//results of command: apt-get dist-upgrade
You might want to run `apt-get -f install' to correct these.
The following packages have unmet dependencies:
libperl5.8: Depends: perl-base (= 5.8.4-2.2) but 5.8.4-2 is installed
perl: Depends: perl-base (= 5.8.4-2.2) but 5.8.4-2 is installed
E: Unmet dependencies. Try using -f.
//results of command: apt-get -f install
Preparing to replace perl-base 5.8.4-2 (using .../perl-base_5.8.4-2.2_i386.deb) ...
Unpacking replacement perl-base ...
dpkg: error processing /var/cache/apt/archives/perl-base_5.8.4-2.2_i386.deb (--unpack):
trying to overwrite `/usr/lib/perl/5.8', which is also in package libclass-multimethods-perl
Errors were encountered while processing:
/var/cache/apt/archives/perl-base_5.8.4-2.2_i386.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
//results of command: apt-get remove libclass-multimethod-perl
imethods-perl
Reading Package Lists... Done
Building Dependency Tree... Done
You might want to run `apt-get -f install' to correct these:
The following packages have unmet dependencies:
libperl5.8: Depends: perl-base (= 5.8.4-2.2) but 5.8.4-2 is to be installed
libquantum-superpositions-perl: Depends: libclass-multimethods-perl but it is not going to be installed
perl: Depends: perl-base (= 5.8.4-2.2) but 5.8.4-2 is to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify asolution).
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.