I try sudo apt-get install libpq-dev
and I got this error
Reading package lists... Done
Building dependency tree
Reading state information... Done
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:
libpq-dev : Depends: libssl-dev but it is not going to be installed
Depends: krb5-multidev but it is not going to be installed
Depends: comerr-dev but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
I also run this command apt-cache policy libpq-dev libssl-dev krb5-multidev comerr-dev
and this is the result
libpq-dev:
Installed: (none)
Candidate: 9.3.4-1
Version table:
9.3.4-1 0
500 http://sd.archive.ubuntu.com/ubuntu/ trusty/main amd64 Packages
libssl-dev:
Installed: (none)
Candidate: 1.0.1f-1ubuntu2
Version table:
1.0.1f-1ubuntu2 0
500 http://sd.archive.ubuntu.com/ubuntu/ trusty/main amd64 Packages
krb5-multidev:
Installed: (none)
Candidate: 1.12+dfsg-2ubuntu4
Version table:
1.12+dfsg-2ubuntu4 0
500 http://sd.archive.ubuntu.com/ubuntu/ trusty/main amd64 Packages
comerr-dev:
Installed: (none)
Candidate: 2.1-1.42.9-3ubuntu1
Version table:
2.1-1.42.9-3ubuntu1 0
500 http://sd.archive.ubuntu.com/ubuntu/ trusty/main amd64 Packages
output of sudo apt-get install libssl-dev krb5-multidev comerr-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
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:
comerr-dev : Depends: libcomerr2 (= 1.42.9-3ubuntu1) but 1.42.9-3ubuntu1.2 is to be installed
krb5-multidev : Depends: libkrb5-3 (= 1.12+dfsg-2ubuntu4) but 1.12+dfsg-2ubuntu5.1 is to be installed
Depends: libk5crypto3 (= 1.12+dfsg-2ubuntu4) but 1.12+dfsg-2ubuntu5.1 is to be installed
Depends: libgssapi-krb5-2 (= 1.12+dfsg-2ubuntu4) but 1.12+dfsg-2ubuntu5.1 is to be installed
libssl-dev : Depends: libssl1.0.0 (= 1.0.1f-1ubuntu2) but 1.0.1f-1ubuntu2.15 is to be installed
Recommends: libssl-doc but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
what i can do to fix this?
Best Answer
Your sources are very outdated, ex. of current versions,
libpq-dev -
9.3.10-0ubuntu0.14.04
libssl-dev -
1.0.1f-1ubuntu2.16
krb5-multidev -
1.12+dfsg-2ubuntu5.2
comerr-dev -
2.1-1.42.9-3ubuntu1.3
Open Software & Updates, make sure that both
trusty-security
&trusty-updates
are enabled under the Updates tab, then reload your sources & see if you get the current versions. If both were already enabled then open a terminal & runsudo apt-get update
, then check for current versions.If that doesn't help then again open Software & Updates & on main page switch to a different mirror in the
Download from:
section, reload sources, ect.