php8.1-bcmath kann unter Ubuntu 22.04 nicht installiert werden

php8.1-bcmath kann unter Ubuntu 22.04 nicht installiert werden
$ sudo apt install php8.1-bcmath
Reading package lists... Done
Building dependency tree... Done
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:
 php8.1-bcmath : Depends: php8.1-common (= 8.1.2-1ubuntu2.14) but 8.1.18-1+ubuntu18.04.1+deb.sury.org+1 is to be installed
E: Unable to correct problems, you have held broken packages.

Ich habe zwar 8.1.18-1+ubuntu18.04.1, sehe aber keine Möglichkeit, auf 8.1.2-1ubuntu2.14 zu aktualisieren. Ich habe apt update und apt upgrade ausgeführt. Wenn ich versuche, PHP neu zu installieren, erhalte ich Folgendes:

$ sudo apt reinstall php8.1
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Reinstallation of php8.1 is not possible, it cannot be downloaded.
0 upgraded, 0 newly installed, 0 to remove and 7 not upgraded.  

Antwort1

Sie verwenden die deb.sury.orgPHP-Repositorys/PPAs.

Die bcmathBibliothek ist NICHT in den sury.org-Repositories verfügbarund ist nur als Teil der Ubuntu-Repositorys verfügbar. Sie können die PHP 8.1-Pakete im Ubuntu-Repository nicht mit den deb.sury.orgPHP-Kernbibliotheken der Repositorys mischen und anpassen.

Entweder müssen die deb.sury.orgRepositories eine aktualisierte Version von bereitstellen php8.1-bcmath, oder Sie müssen die deb.sury.orgPHP-Repositories entfernen und aus den Ubuntu-Repositories zu 8.1.2 PHP zurückkehren.

Eine andere „Hybrid“-Lösung gibt es hier nicht.

verwandte Informationen