我已经从 Ubuntu 18.04.1 升级到 Ubuntu 20.04.1(强制发布升级),然后在安装时还php.7-4
需要安装libssl-dev
,这导致了以下未满足的依赖项:
sudo apt install libssl-dev
The following packages have unmet dependencies:
libssl-dev : Depends: libssl1.1 (= 1.1.1f-1ubuntu2) but 1.1.1g-1+ubuntu18.04.1+deb.sury.org+1 is to be installed
我已禁用存储库:
ondrej
和certbot
。其余存储库是 focal fossa (20.04.1) 的默认存储库清理存储库,例如(
apt update --fix-missing
)
但问题仍然存在。
答案1
问题在于需要降级的 libssl1.1 (= 1.1.1f-1ubuntu2) 的字母版本。使用以下命令可轻松完成此操作,synaptic
而不是apt install
如下操作:
sudo aptitude install libssl-dev
he following NEW packages will be installed:
libssl-dev{b}
0 packages upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 1.582 kB of archives. After unpacking 8.005 kB will be used.
The following packages have unmet dependencies:
libssl-dev : Depends: libssl1.1 (= 1.1.1f-1ubuntu2) but 1.1.1g-1+ubuntu18.04.1+deb.sury.org+1 is installed
The following actions will resolve these dependencies:
Keep the following packages at their current version:
1) libssl-dev [Not Installed]
Accept this solution? [Y/n/q/?] n
The following actions will resolve these dependencies:
Downgrade the following packages:
1) libssl1.1 [1.1.1g-1+ubuntu18.04.1+deb.sury.org+1 (now) -> 1.1.1f-1ubuntu2 (focal)]
Accept this solution? [Y/n/q/?] y
The following packages will be DOWNGRADED:
libssl1.1
The following NEW packages will be installed:
libssl-dev
0 packages upgraded, 1 newly installed, 1 downgraded, 0 to remove and 0 not upgraded.
Need to get 2.900 kB of archives. After unpacking 8.087 kB will be used.
Do you want to continue? [Y/n/?] Y
基本上不接受建议的解决方案并进行软件包降级
答案2
我只是这样做,并且对我有用:)
sudo apt-get install libssl1.1="1.1.1f-1ubuntu2"