解决ARM Ubuntu 22.04缺少libssl1.1的问题

在安装 php5.6 时,出现以下报错信息

The following packages have unmet dependencies:
 php5.6 : Depends: libapache2-mod-php5.6 but it is not installable or
                   php5.6-fpm but it is not installable or
                   php5.6-cgi but it is not installable
 php5.6-common : Depends: libssl1.1 (>= 1.1.0) but it is not installable
E: Unable to correct problems, you have held broken packages.

提示缺少依赖 libssl1.1,于是使用 apt 安装一下

sudo apt install libssl1.1

发现找不到这个依赖包

E: Package 'libssl1.1' has no installation candidate

经查阅资料了解到,在 Ubuntu 18.04 以后的版本中,libssl1.1 已经从仓库中被移除了,因此在 Ubuntu 20.04 和 Ubuntu 22.04 系统下,我们只能手动安装这个依赖包。

由于网上大多数教程都是基于 x86_64 平台的,使用的仓库和 ARM 平台是不同的。我们可以用浏览器打开官方的 ubuntu-ports 仓库来下载 libssl1.1,选择 libssl1.1_1.1.1-1ubuntu2.1~18.04.22_arm64.deb 然后单击下载

在这里插入图片描述

如果你的 Ubuntu 系统没有图形化界面,也可以使用 wget 命令来下载

wget http://ports.ubuntu.com/ubuntu-ports/pool/main/o/openssl/libssl1.1_1.1.1-1ubuntu2.1~18.04.22_arm64.deb

依赖包下载完成后,进入其所在的目录,使用软件安装工具 dpkg 来安装

sudo dpkg -i libssl1.1_1.1.1-1ubuntu2.1~18.04.22_arm64.deb

安装完成后就不会提示缺少依赖啦。

猜你喜欢

转载自blog.csdn.net/iBenzene/article/details/130902653