Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how install pdo-mysql in centos7

I install laravel 5 and then install packages neede.

I install php-pdo and some other but now i cant install pdo-mysql and laravel return error.

PDOException in PDOConnection.php line 47: could not find driver 

I am use Centos 7 and PHP 5-6-29.

like image 715
paitakht_pc Avatar asked Dec 02 '25 12:12

paitakht_pc


1 Answers

Check which package is installed (which provider) and provides the stack, then use the same namespace.

  • Webtatic uses php56w-*
  • IUS uses php56u-*
  • remi-safe (SCL packages) use php56-php-*
  • remi-php56 simply use php-*
  • other providers can use something else

As you need pdo_mysql driver, simply

yum install <namespace>-pdo_mysql

(using the ext name, yum will find the correct package name which provides this ext).

Also check you don't have any "exclude" lines in the yum configuration (such as the ones provided in altered cpanel distributions)

like image 54
Remi Collet Avatar answered Dec 05 '25 03:12

Remi Collet



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!