Ali*_*aki 5 package-management
我尝试sudo apt-get install libpq-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:
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.
Run Code Online (Sandbox Code Playgroud)
我也运行这个命令apt-cache policy libpq-dev libssl-dev krb5-multidev comerr-dev
,这是结果
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
Run Code Online (Sandbox Code Playgroud)
输出 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.
Run Code Online (Sandbox Code Playgroud)
我能做些什么来解决这个问题?
正如我在这里和你的问题中看到的,你有一些(手动?)安装的软件包与 Ubuntu 标准存储库中的软件包冲突。您想要安装的软件包需要完全符合所需版本的依赖项。
运行以下命令:
sudo apt-get update
sudo apt-get install libssl1.0.0=1.0.1f-1ubuntu2 ibcomerr2=1.42.9-3ubuntu1
Run Code Online (Sandbox Code Playgroud)
降低他们每个人的等级。
对于其他软件包,您必须启用trusty-security
和(使用从此处trusty-updates
获取的小脚本)。该软件包包含比已安装版本更高的版本。
sudo apt-get install git
git clone https://github.com/kos0/addRemoveDistribution.git
cd addRemoveDistribution
Run Code Online (Sandbox Code Playgroud)
sudo ./enableDisableDistribution.pl enable security
sudo ./enableDisableDistribution.pl enable updates
Run Code Online (Sandbox Code Playgroud)
在那之后
sudo apt-get update
sudo apt-get install libpq-dev
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
6838 次 |
最近记录: |