无法在 ubuntu 16.04 中安装 libpq-dev

无法在 ubuntu 16.04 中安装 libpq-dev

我尝试libpq-dev在 ubuntu 16.04 中安装,但出现了这个问题:

The following packages have unmet dependencies:
 libpq-dev : Depends: krb5-multidev but it is not going to be installed

E: Unable to correct problems, you have held broken packages.

因此我尝试krb5-multidev使用命令进行安装sudo apt-get install krb5-multidev但收到此错误:

krb5-multidev : Depends: libkrb5-3 (= 1.13.2+dfsg-5) but 1.13.2+dfsg-5ubuntu2 is to be installed        
Depends: libk5crypto3 (= 1.13.2+dfsg-5) but 1.13.2+dfsg-5ubuntu2 is to be installed                 
Depends: libgssapi-krb5-2 (= 1.13.2+dfsg-5) but 1.13.2+dfsg-5ubuntu2 is to be installed
E: Unable to correct problems, you have held broken packages.

它看起来与 ubuntu 包冲突所以有人能帮我解决这个问题吗!!!

答案1

请尝试这些命令,从清理临时文件开始,配置所有未解压但未配置的包,然后修复损坏的包依赖关系,更新并安装 libpq:

sudo apt-get clean   
sudo dpkg --configure -a  
sudo apt-get -f install  
sudo apt-get update  
sudo apt-get install libpq-dev  

相关内容