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로 업그레이드할 방법이 없습니다. 나는 적절한 업데이트와 적절한 업그레이드를 실행했습니다. 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.

bcmathsury.org 저장소에서는 라이브러리를 사용할 수 없습니다 ., Ubuntu 리포지토리의 일부로만 사용할 수 있습니다. Ubuntu 저장소의 PHP 8.1 패키지를 deb.sury.org저장소의 핵심 PHP 라이브러리와 혼합하여 사용할 수 없습니다.

저장소 deb.sury.org는 업그레이드된 버전을 제공해야 php8.1-bcmath하거나, PHP 저장소를 제거 deb.sury.org하고 Ubuntu 저장소에서 8.1.2 PHP로 되돌려야 합니다.

여기에는 다른 '하이브리드' 솔루션이 없습니다.

관련 정보