我试图通过以下命令在Ubuntu18.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.**如何解决这些错误?
发布于 2022-10-03 20:14:02
在Ubuntu上安装libssl1.0-dev有三种方法。我们可以使用apt-get,apt和智能。在下面的部分中,我们将描述每种方法。你可以选择其中之一。
使用apt-get安装libssl1.0dev
sudo apt-get update
sudo apt-get -y install libssl1.0-dev使用apt安装libssl1.0dev
sudo apt update
sudo apt -y install libssl1.0-dev使用智能安装libssl1.0dev
sudo aptitude update
sudo aptitude -y install libssl1.0-dev发布于 2022-10-04 00:05:09
下面的命令序列应该可以解决依赖关系。
$ sudo apt-获取安装-f #修复系统上的依赖关系。
$ sudo配置-a #重新配置所有未打包的包。
$ sudo apt-获取安装-f #修复系统中的依赖关系。
$ sudo apt-在系统上安装 #安装包。
https://stackoverflow.com/questions/73936770
复制相似问题