简体   繁体   中英

QueryException Laravel : Driver not found

I am facing a strange error with laravel under ubuntu using PostgreSql. Its NOT a PDOException. The database migration is successful so all driver are set and PDO connection is also established. But why this error?

Didn't find much about it in google. I am attaching the screenshot.

This is NOT homestead rather own lamp stack. 在此处输入图片说明

Edit: There is no problem even with tinker在此处输入图片说明

Regards

I resolved this issue using the following command:-

sudo apt install php7.4-pgsql (replace 7.4 with your php version)

To check PHP version use: php -v

For more info visit: https://www.php.net/manual/en/pgsql.installation.php

Please check php info and serach "PDO Driver for PostgreSQL" or "pdo_pgsql" after run the above command

keywords :- for pgadmin, pgsql, postgresql, PDO Driver for PostgreSQL, pdo_pgsql @vasimraja

Please check the default key in app/config/database.php

For postgres, default should be 'default' => 'postgres',

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM