laravel - manjaro linux 中的 php artisan 迁移错误

标签 laravel manjaro

我在 manjaro linux 中使用 laravel..如果我执行 php artisan migrate 命令,它会给我这个错误,我该如何解决这个问题。我也已经安装了 xampp 谢谢..

错误:

Illuminate\Database\QueryException  : could not find driver (SQL: select * from     information_schema.tables where table_schema = nws and table_name = migrations and t    able_type = 'BASE TABLE')

at /run/media/snake/Entertainment/VS/linuxTest/Nurses/NW/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   PDOException::("could not find driver")
    run/media/snake/Entertainment/VS/linuxTest/Nurses/NW/vendor/laravel/framework/src/
    lluminate/Database/Connectors/Connector.php:70

      2 PDO::__construct("mysql:host=127.0.0.1;port=3306;dbname=nws", "root", "", [])
    /run/media/snake/Entertainment/VS/linuxTest/Nurses/NW/vendor/laravel/framework/src/
    Illuminate/Database/Connectors/Connector.php:70

    Please use the argument -v to see more details.

最佳答案

确保您已经安装了 Maria/MySQL 及其 PHP 驱动程序。

sudo pacman -Syu mariadb mariadb-clients libmariadbclient

关于laravel - manjaro linux 中的 php artisan 迁移错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57753139/

相关文章:

c++ - 如何为 manjaro 中安装的 opencv4 修复 "fatal error: opencv2/core.hpp: No such file or directory"

java - 如何在 Manjaro 中通过命令行更改 java 的默认版本?

php - Laravel Docker - SQLSTATE[HY000] [2002] php_network_getaddresses : getaddrinfo failed: Name or service not known

php - Laravel 为 hasManyThrough 关系调用未定义的方法 Illuminate\Database\Query\Builder::detach/attach()

php - Laravel 进行假迁移

sql - Postgres 无法连接到数据库 postgres : could not connect to server: No such file or directory?

php - 使用 Laravel 5.8 验证时显示错误消息的问题

php - 查询构建器不插入时间戳

linux - 快照删除说 vscode 未安装

php - Manjaro (Arch Linux) 上的 Magento 2 安装 ~ 缺少 php 扩展