我已经重新安装了我的 ubuntu 1.04.3。首先我安装了php:7.2.19,nodejs:12.10.0,apache和mysql。之后,我全局安装了 composer 和一些 php 扩展,这些扩展是安装 Laravel 所需的,并完成了 laravel 的安装。我使用 Laravel new 命令创建了一个项目...当我尝试执行“php artisan migrate”时,我遇到了这个错误,我不知道该怎么做。
错误: *
Illuminate\Database\QueryException : 找不到驱动程序 (SQL: PRAGMA foreign_keys = ON;)
在/home/dbalaskas/Desktop/Laravel/myProject/vendor/laravel/framework/src/Illuminate/Database/Connection.php:665
661| // If an exception occurs when attempting to run a query, we'll format the error
662| // message to include the bindings with SQL, which will make this exception a
663| // lot more helpful to the developer instead of just the database's errors.
664| catch (Exception $e) {
> 665| throw new QueryException(
666| $query, $this->prepareBindings($bindings), $e
667| );
668| }
669|
异常跟踪:
1 PDOException::("找不到驱动程序") /home/dbalaskas/Desktop/Laravel/myProject/vendor/laravel/framework/src/Illuminate/Database/Connectors/Connector.php:70
2
PDO::__construct("sqlite:/home/dbalaskas/Desktop/Laravel/myProject/database/database.sqlite", []) /home/dbalaskas/Desktop/Laravel/myProject/vendor/laravel/framework/src/Illuminate /数据库/连接器/Connector.php:70
请使用参数 -v 查看更多详细信息。*
.env 文件:
APP_NAME=Laravel
APP_ENV=local
APP_KEY=base64:aG05wMCXTkKQeBdTAZBGzjvyfY8gyhPmZs4qoKIiYU4=
APP_DEBUG=true
APP_URL=http://localhost
LOG_CHANNEL=stack
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=laravel
DB_USERNAME=root
DB_PASSWORD=
BROADCAST_DRIVER=log
CACHE_DRIVER=file
QUEUE_CONNECTION=sync
SESSION_DRIVER=file
SESSION_LIFETIME=120
REDIS_HOST=127.0.0.1
REDIS_PASSWORD=null
REDIS_PORT=6379
MAIL_DRIVER=smtp
MAIL_HOST=smtp.mailtrap.io
MAIL_PORT=2525
MAIL_USERNAME=null
MAIL_PASSWORD=null
MAIL_ENCRYPTION=null
AWS_ACCESS_KEY_ID=
AWS_SECRET_ACCESS_KEY=
AWS_DEFAULT_REGION=us-east-1
AWS_BUCKET=
PUSHER_APP_ID=
PUSHER_APP_KEY=
PUSHER_APP_SECRET=
PUSHER_APP_CLUSTER=mt1
拉丁的传说
慕田峪7331174
qq_遁去的一_1