
$ 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.
De hecho, tengo 8.1.18-1+ubuntu18.04.1 pero no veo forma de actualizar a 8.1.2-1ubuntu2.14. He ejecutado apt update y apt update. Cuando intento reinstalar php me sale esto:
$ 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.
Respuesta1
Estás utilizando los deb.sury.org
repositorios/PPA de PHP.
La bcmath
biblioteca NO está disponible en los repositorios de sury.orgy solo está disponible como parte de los repositorios de Ubuntu. No puede mezclar ni combinar los paquetes PHP 8.1 en el repositorio de Ubuntu con las deb.sury.org
bibliotecas PHP principales de los repositorios.
O los deb.sury.org
repositorios deben proporcionar una versión actualizada de php8.1-bcmath
, o debe eliminar los deb.sury.org
repositorios PHP y volver a PHP 8.1.2 desde los repositorios de Ubuntu.
No existe ninguna otra solución "híbrida" en este caso.