Ubuntu安装libssl-dev和libssl1.0-dev出错

avwztpqn  于 2022-10-04  发布在  Linux
关注(0)|答案(2)|浏览(1594)

我正在尝试通过以下命令在Ubuntu 18.04中安装libssl-dev和libssl1.0-dev:

sudo apt-get -y install build-essential openssl libssl-dev libssl1.0 libgl1-mesa-dev libqt5x11extras5

我得到以下输出:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Note, selecting 'libssl1.0-dev' for regex 'libssl1.0'
Note, selecting 'libssl1.0.0' for regex 'libssl1.0'
Note, selecting 'libssl1.0.2' for regex 'libssl1.0'
build-essential is already the newest version (12.4ubuntu1).
libqt5x11extras5 is already the newest version (5.9.5-0ubuntu1).
libqt5x11extras5 set to manually installed.
libgl1-mesa-dev is already the newest version (20.0.8-0ubuntu1~18.04.1).
libgl1-mesa-dev set to manually installed.
libssl-dev is already the newest version (1.1.1-1ubuntu2.1~18.04.20).
libssl1.0.0 is already the newest version (1.0.2n-1ubuntu5.10).
openssl is already the newest version (1.1.1-1ubuntu2.1~18.04.20).
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 : Conflicts: libssl1.0-dev but 1.0.2n-1ubuntu5.10 is to be installed
 libssl1.0-dev : Conflicts: libssl-dev but 1.1.1-1ubuntu2.1~18.04.20 is to be installed
E: Unable to correct problems, you have held broken packages.**

如何解决这些错误?

dba5bblo

dba5bblo1#

在Ubuntu上安装libssl1.0-dev有三种方式。我们可以用apt-get、apt和apitty。在接下来的部分中,我们将介绍每种方法。你可以选择其中一种。

使用apt-get安装libssl1.0-dev

sudo apt-get update
sudo apt-get -y install libssl1.0-dev

使用apt安装libssl1.0-dev

sudo apt update
sudo apt -y install libssl1.0-dev

使用智能安装libssl1.0-dev

sudo aptitude update
sudo aptitude -y install libssl1.0-dev
5kgi1eie

5kgi1eie2#

以下命令序列应可用于解析依赖项。

$sudo APT-GET INSTALL-f#修复系统上损坏的依赖项。

$sudo dpkg-configuration-a#重新配置所有解包。

$sudo apt-get install-f#修复系统中损坏的依赖项。

$sudo apt-get安装<程序包名称>#在系统上安装程序包。

相关问题