libssl-dev 版本依赖性与已安装的 libssl1.0.0 冲突

libssl-dev 版本依赖性与已安装的 libssl1.0.0 冲突

Ubuntu 14.04 存储库:universe、main

运行 apt-get update

运行 apt-cache policy libssl1.0.0

ddew@ddew-wsl:~$ apt-cache policy libssl1.0.0
libssl1.0.0:
  Installed: 1.0.1f-1ubuntu2.11
  Candidate: 1.0.1f-1ubuntu2.11
  Version table:
 *** 1.0.1f-1ubuntu2.11 0
        100 /var/lib/dpkg/status
     1.0.1f-1ubuntu2 0
        500 http://archive.ubuntu.com/ubuntu/ trusty/main amd64 Packages

令人惊讶的是,宣传的候选版本与主版本不同,并且主版本提供的版本比已安装的版本更旧。

尝试安装 libssl-dev

ddew@ddew-wsl:~$ sudo apt-get install libssl-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:
 libssl-dev : Depends: libssl1.0.0 (= 1.0.1f-1ubuntu2) but 1.0.1f-1ubuntu2.11 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.

出于好奇,运行了 apt-cache policy libssl-dev

ddew@ddew-wsl:~$ apt-cache policy libssl-dev
libssl-dev:
  Installed: (none)
  Candidate: 1.0.1f-1ubuntu2
  Version table:
     1.0.1f-1ubuntu2 0
        500 http://archive.ubuntu.com/ubuntu/ trusty/main amd64 Packages 

答案1

Ubuntu 16.04 上也有同样的问题

$ apt-cache policy libssl1.0.0    
libssl1.0.0:
  Installed: 1.0.2g-1ubuntu4.5
  Candidate: 1.0.2g-1ubuntu4.5
  Version table:
 *** 1.0.2g-1ubuntu4.5 100
        100 /var/lib/dpkg/status
     1.0.2g-1ubuntu4.1 500
        500 http://mirror.uoregon.edu/ubuntu xenial-updates/main amd64 Packages
        500 http://mirror.uoregon.edu/ubuntu xenial-security/main amd64 Packages
     1.0.2g-1ubuntu4 500
        500 http://mirror.uoregon.edu/ubuntu xenial/main amd64 Packages

$ apt-cache policy libssl-dev
libssl-dev:
  Installed: (none)
  Candidate: 1.0.2g-1ubuntu4.1
  Version table:
     1.0.2g-1ubuntu4.1 500
        500 http://mirror.uoregon.edu/ubuntu xenial-updates/main amd64 Packages
        500 http://mirror.uoregon.edu/ubuntu xenial-security/main amd64 Packages
     1.0.2g-1ubuntu4 500
        500 http://mirror.uoregon.edu/ubuntu xenial/main amd64 Packages

所以我修复了它

sudo apt-get install libssl1.0.0=1.0.2g-1ubuntu4.1

答案2

这对我有用:

由于“未满足的依赖关系”而无法安装 libssl1.0.0:i386?

sudo apt-get install libssl1.0.0/trusty libssl-dev/trusty openssl/trusty

答案3

我用 libssl3 解决了我的问题:

问题:

The following packages have unmet dependencies:
 libssl-dev : Depends: libssl3 (= 3.0.2-0ubuntu1.1) but 3.0.2-0ubuntu1.2 is to be installed
E: Unable to correct problems, you have held broken packages.

解决方案:

我降级了libssl3版本

sudo apt install libssl3=3.0.2-0ubuntu1.1

答案4

我已经解决了这个问题

The following packages have unmet dependencies:
 libssl-dev : Depends: libssl3 (= 3.0.2-0ubuntu1) but 3.0.2-0ubuntu1.2 is to be installed
E: Unable to correct problems, you have held broken packages.

回答:

sudo apt install libssl3=3.0.2-0ubuntu1

相关内容