Branden Hall asked:
I’m trying to install libpq-dev (PostgreSQL library) on Ubuntu 11.10. When I run apt-get I get the following:
The following packages have unmet dependencies.
libpq-dev : Depends: libkrb5-dev but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
And then when I go to install libkrb5-dev, I get this:
The following packages have unmet dependencies.
krb5-multidev : Depends: libkrb5-3 (= 1.9.1+dfsg-1ubuntu1) but 1.9.1+dfsg-1ubuntu2.2 is to be installed
Depends: libk5crypto3 (= 1.9.1+dfsg-1ubuntu1) but 1.9.1+dfsg-1ubuntu2.2 is to be installed
Depends: libgssapi-krb5-2 (= 1.9.1+dfsg-1ubuntu1) but 1.9.1+dfsg-1ubuntu2.2 is to be installed
E: Unable to correct problems, you have held broken packages.
At which point I’m completely lost as it seems like I already have the required packages, but krb5-multidev wants older versions, is that right? How do I work around this?
My answer:
You’ve installed some packages from a newer version of Ubuntu, or from a third party PPA, which conflict with the Ubuntu version you originally installed.
To fix this problem:
-
Disable the PPA, if there is one.
-
Check
/etc/apt/sources.list
and verify that the Ubuntu version being used is the one you want (e.g.lucid
,precise
, etc.). -
Run
sudo apt-get update && sudo apt-get dist-upgrade
to resync all of your packages to the correct versions. This will both upgrade and downgrade as necessary to get your system back in sync.
View the full question and any other answers on Server Fault.
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.