无法在Ubuntu 14.04中安装libpq-dev


12

我无法为Postgresql安装libpq-dev,我尝试过

sudo apt-get install libpq-dev

和输出

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: libpq5 (= 9.3.9-0ubuntu0.14.04) but 9.4.4-1.pgdg14.04+1 is to be installed
E: Unable to correct problems, you have held broken packages.

如何解决这个问题?


请参阅此处启用该图像中所示的所有功能!
拉万

输出是dpkg --get-selections | grep hold什么?
罗恩(Ron)2015年

Answers:


24

问题解决了!

我用remove解决了这个问题libpq5

sudo apt-get remove libpq5
sudo apt-get install libpq-dev

很简单!仅供参考-我必须sudo apt-get update
先做

By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.