Ater execute any command getting this error
Operating system :- Mint ubuntu
Php version :- 7.2
Could make sure that you have installed the php-pdo and php-mysql packages?
Maybe you have different PHP versions installed. Check first which PHP version you are using
php --version
then install the packages for your PHP version. For example
apt-get install php7.4-pdo php7.4-mysql
Make sure this php extension is enabled:
extension=pdo_mysql
Backup and replace Setup folder on the root with already installed magento 2.* setup folder.
Then run the php bin/magento setup:upgrade and other.It will be fix.