我正在尝试安装 PHP,但这个错误一直出现,我不知道如何解决。有人能帮我吗?错误
❯ sudo apt-get install php
Reading package lists... Done
Building dependency tree
Reading state information... Done
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:
php : Depends: php8.1 but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
编辑:
❯ sudo apt update
Hit:1 https://dl.winehq.org/wine-builds/ubuntu focal InRelease
Hit:2 https://download.docker.com/linux/ubuntu focal InRelease
Get:3 https://deb.opera.com/opera-stable stable InRelease [2.590 B]
Hit:4 https://repo.steampowered.com/steam stable InRelease
Hit:5 http://ppa.launchpad.net/lutris-team/lutris/ubuntu focal InRelease
Get:6 http://security.ubuntu.com/ubuntu focal-security InRelease [114 kB]
Hit:7 http://packages.microsoft.com/repos/code stable InRelease
Hit:8 http://br.archive.ubuntu.com/ubuntu focal InRelease
Get:9 http://br.archive.ubuntu.com/ubuntu focal-updates InRelease [114 kB]
Hit:10 http://ppa.launchpad.net/ondrej/php/ubuntu focal InRelease
Get:11 http://security.ubuntu.com/ubuntu impish-security InRelease [110 kB]
Get:12 http://br.archive.ubuntu.com/ubuntu focal-backports InRelease [108 kB]
Get:13 http://security.ubuntu.com/ubuntu focal-security/main amd64 DEP-11 Metadata [40,7 kB]
Get:14 http://security.ubuntu.com/ubuntu focal-security/universe amd64 DEP-11 Metadata [66,4 kB]
Get:15 http://security.ubuntu.com/ubuntu focal-security/multiverse amd64 DEP-11 Metadata [2.464 B]
Get:16 http://security.ubuntu.com/ubuntu impish-security/main amd64 DEP-11 Metadata [20,2 kB]
Fetched 579 kB in 2s (257 kB/s)
Reading package lists... Done
Building dependency tree
Reading state information... Done
188 packages can be upgraded. Run 'apt list --upgradable' to see them.
sudo apt upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
The following packages have been kept back:
bind9-dnsutils bind9-host bsdutils curl distro-info-data ghostscript-x
libcurl4 libldb2 libnss-systemd libpam-systemd libpcre2-8-0
libreoffice-common libreoffice-help-common libreoffice-help-en-us
libreoffice-help-pt libreoffice-help-pt-br libreoffice-l10n-pt
libreoffice-l10n-pt-br libreoffice-style-tango libsystemd0 libsystemd0:i386
libtiff5 libudev1 libudev1:i386 libxml2 libxml2:i386 rsyslog systemd-sysv
systemd-timesyncd thunderbird-gnome-support vim-common
0 upgraded, 0 newly installed, 0 to remove and 31 not upgraded.