php - 我正在使用 manjaro 并且无法使用 php artisan 迁移它显示找不到 sql 驱动程序
问题描述
我一直面临的问题是
Illuminate\Database\QueryException : could not find driver (SQL: select * from information_schema.tables where table_schema = public and table_name = migrations and table_type = 'BASE TABLE')
at /home/orsih/Documents/project/ITG/multischool/vendor/laravel/framework/src/Illuminate/Database/Connection.php:664
660| // If an exception occurs when attempting to run a query, we'll format the error
661| // message to include the bindings with SQL, which will make this exception a
662| // lot more helpful to the developer instead of just the database's errors.
663| catch (Exception $e) {
> 664| throw new QueryException(
665| $query, $this->prepareBindings($bindings), $e
666| );
667| }
668|
Exception trace:
1 Doctrine\DBAL\Driver\PDO\Exception::("could not find driver")
/home/orsih/Documents/project/ITG/multischool/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDO/Exception.php:18
2 Doctrine\DBAL\Driver\PDO\Exception::new()
/home/orsih/Documents/project/ITG/multischool/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php:43
Please use the argument -v to see more details.
我尝试从扩展名中删除逗号=pdo_mysql无法阻止扩展名=pdo_mysql.so
谢谢你
解决方案
我正在使用 pgsql,所以我不得不注释掉
exptension=pdo_mysql
exptension=pdo_pgsql
exptension=pgsql
它对我有用,希望对你有帮助
推荐阅读
- vulkan - 使用vulkan时记录命令的正确方法是什么?
- html - 在我的范围内扩展 Bootstrap Navigator 时遇到问题
- php - 私人频道上的 Laravel Echo + Pusher 订阅错误
- java - 使用 Jackson 在嵌套 JSON 对象中开始解析
- c++ - QGraphicsRectItem 移出场景
- outlook - Outlook 2016 不会在事件电子邮件邀请中呈现徽标(图像)
- laravel - Laravel 5.在视图“表单”中获取重定向变量到控制器
- twig - 选择树枝块处理顺序
- javascript - 从仪表板页面编辑器将 JavaScript 添加到 WordPress 页面
- matlab - 通过空间卷积找到 z 的偏导数