pdo_mysql extension is not installed
Pergunta
IT`s a fresh Magento 2.1 files
Initially all working fine , but after some time its giving this error
[Zend_Db_Adapter_Exception]
pdo_mysql extension is not installed
cache:clean [--bootstrap="..."] [types1] ... [typesN]
As per localhost/dashboard/phpinfo.php
I am using PHP Version 5.6.30
maddy@maddy:/opt/lampp$ sudo apt-get install pdo-mysql php5.0-mysql
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package pdo-mysql
E: Unable to locate package php5.0-mysql
E: Couldn't find any package by glob 'php5.0-mysql'
E: Couldn't find any package by regex 'php5.0-mysql'
maddy@maddy:/opt/lampp$
**Even below command don`t work**
maddy@maddy:/opt/lampp$ sudo apt-get install pdo-mysql php7.0-mysql
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package pdo-mysql
I checked the availability
maddy@maddy:~$ sudo phpenmod pdo_mysql
[sudo] password for maddy:
WARNING: Module pdo_mysql ini file doesn't exist under /etc/php/7.0/mods-available
Solução
type this in your terminal. this is because of missing php-mysql
For php7.0
sudo apt-get install php7.0-gd php7.0-mysql
For php5
sudo apt-get install php5-gd php5-mysql
Licenciado em: CC-BY-SA com atribuição
Não afiliado a magento.stackexchange