Experiencing Error ‘MongoDB\Driver\Manager’ not found when migrating from PHP 7.4 to 8.1 using docker on Debian 11 in Azure, Kindly assist with resolution or tips to resolve this please.
I perform the below with no resolution:
Make sure you has installed php mongodb
sudo apt install php8.1-mongodb
To do this in Ubuntu, you’ll need the php-pear plugin and php-dev
sudo apt install php-dev php-pear
then you can run:
sudo pecl install mongodb
then add “extension=mongodb.so” to php.ini
then restart your php service
service php8.1-fpm restart
Or
service php-fpm restart
https://www.php.net/manual/en/mongodb.installation.pecl.php#125027
Below was the outcome:
Reading package lists… Done
Building dependency tree… Done
Reading state information… Done
Package php-pear is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
Package php-dev is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package ‘php-dev’ has no installation candidate
E: Package ‘php-pear’ has no installation candidate