Appearance
举一个具体的错误例子:
在ubuntu 18.04-1apt install libssl-dev
,这时候报下面错误:
The following packages have unmet dependencies:
libssl-dev : Depends: libssl1.1 (= 1.1.0g-2ubuntu4) but 1.1.0g-2ubuntu4.1 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.
可以看到libssl-dev 希望安装的是1.1.0g-2ubuntu4,但是现在系统升级了,想安装的是最新的1.1.0g-2ubuntu4.1. 这时候我们可以强制安装稍微低一点的版本.
sudo apt-get install libssl1.1=1.1.0g-2ubuntu4
这样就可以成功安装了.