When i use php bin/magento setup:static-content:deploy in ubuntu i am getting this error "pdo_mysql extension is not installed" so please help me?

  • 1
    Please install/enable pdo_mysql extension. Aug 9, 2017 at 12:41

2 Answers 2


@SHPatel is right. There is an answer on askubuntu that gives instructions HERE

I am going to assume that you have PHP 7 installed, otherwise you would never have gotten a Magento 2 instance running. In which case, it is 3 easy steps:

  1. If it isn't already, install php7.0-mysql:

    sudo apt-get install php7.0-mysql
  2. It is possible that it was already installed but the pdo_mysql module wasn't enabled. Either way, enable pdo_mysql:

    sudo phpenmod pdo_mysql
  3. Then just restart Apache:

    sudo service apache2 restart

Hope this helps!


install PDO extention of SAME php version from EasyApache4 whm

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.