Невозможно установить php8.1-bcmath на Ubuntu 22.04

Невозможно установить php8.1-bcmath на Ubuntu 22.04
$ 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.

У меня действительно 8.1.18-1+ubuntu18.04.1, но я не вижу способа обновиться до 8.1.2-1ubuntu2.14. Я запустил apt update и apt upgrade. Когда я пытаюсь переустановить php, я получаю это:

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

решение1

Вы используете deb.sury.orgPHP-репозитории/PPA.

Библиотека bcmathНЕ ​​доступна в репозиториях sury.org, и доступен только как часть репозиториев Ubuntu. Вы не можете смешивать и сопоставлять пакеты PHP 8.1 в репозитории Ubuntu с deb.sury.orgосновными библиотеками PHP репозиториев.

Либо deb.sury.orgрепозитории должны предоставлять обновленную версию php8.1-bcmath, либо вам придется удалить deb.sury.orgрепозитории PHP и вернуться к версии PHP 8.1.2 из репозиториев Ubuntu.

Другого «гибридного» решения здесь нет.

Связанный контент