'php8.1-bcmath : Depends: php8.1-common (= 8.1.2-1ubuntu2) but 8.1.2-1ubuntu4 is to be installed

I am upgrading an image that used PHP 7.4 and now I am planning to use PHP 8.1.

However, I am getting the error

php8.1-bcmath : Depends: php8.1-common (= 8.1.2-1ubuntu2) but 8.1.2-1ubuntu4 is to be installed php8.1-fpm : Depends: php8.1-common (= 8.1.2-1ubuntu2) but 8.1.2-1ubuntu4 is to be installed

On this line

apt install php8.1-bcmath php8.1-fpm php8.1-common

What I should do to install those dependencies?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source