Ubuntu 22.04 に php8.1-bcmath をインストールできない

Ubuntu 22.04 に php8.1-bcmath をインストールできない
$ 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

PHP リポジトリ/PPAを使用していますdeb.sury.org

このbcmathライブラリはsury.orgリポジトリでは利用できませんは、Ubuntu リポジトリの一部としてのみ利用可能です。Ubuntu リポジトリ内の PHP 8.1 パッケージとdeb.sury.orgリポジトリのコア PHP ライブラリを混在させることはできません。

deb.sury.orgリポジトリが のアップグレードバージョンを提供するか、 PHP リポジトリを削除して Ubuntu リポジトリから 8.1.2 PHP に戻すphp8.1-bcmath必要があります。deb.sury.org

他に「ハイブリッド」ソリューションはありません。

関連情報