Ubuntu 18.04 上的 libssl-dev 依赖问题

Ubuntu 18.04 上的 libssl-dev 依赖问题

我目前正在尝试在 Ubuntu 18.04 上安装 libssl-dev,但遇到了这个问题:

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.1 (= 1.1.0g-2ubuntu4.3) but 1.1.1b-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.

我尝试了所有常用方法,例如更新、重启等。我在其他地方搜索过这个问题,但每次找到的答案要么不起作用,要么太旧/不相关,要么根本不存在。如果需要,我很乐意提供更多信息。感谢您的帮助。

答案1

我通过运行以下命令解决了该问题:

sudo apt install --reinstall libssl1.1=1.1.0g-2ubuntu4.3

sudo apt install libssl-dev

然后我重新安装了 libssl 降级时卸载的几个软件包。现在一切似乎都运行顺利。

相关内容