繁体   English   中英

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

[英]Error in installing libssl-dev and libssl1.0-dev in Ubuntu

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

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

我收到以下 output:

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.**

我该如何解决这些错误?

在Ubuntu上安装libssl1.0-dev有3种方式,我们可以使用apt-get、apt和aptitude。 在以下部分中,我们将描述每种方法。 您可以选择其中之一。

使用 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

使用 aptitude 安装 libssl1.0-dev

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

以下命令序列应该可以解决依赖关系。

# Fix broken dependencies on your system.
sudo apt-get install -f
# Reconfigure all unpacked packages.
sudo dpkg -–configure -a
# Fix broken dependencies in your system.
sudo apt-get install -f
# Install package on the system.
sudo apt-get install <package_name>

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM