Laravel-用sqlite找不到驱动程序异常
我正在 Ubuntu 17.4 上使用 Laravel .当我键入以下命令时:php artisan migrate:refresh
我遇到以下问题:
I'm using Laravel on Ubuntu 17.4. When I type this command: php artisan migrate:refresh
I get the following issue:
[Illuminate \ Database \ QueryException] 找不到驱动程序(SQL:从sqlite_master中选择*,其中type ='table'且name = migrations)
[PDOException]
找不到驱动程序
[Illuminate\Database\QueryException] could not find driver (SQL: select * from sqlite_master where type = 'table' and name = migrations)
[PDOException]
could not find driver
我试图通过运行sudo apt-get install php7.1-sqlite3
来安装sqlite驱动程序,但是出现了以下问题:
I tried to install sqlite driver by running sudo apt-get install php7.1-sqlite3
but I got the following issue:
正在阅读包裹清单...已完成
构建依赖关系树
正在读取状态信息...完成
E:无法找到软件包php7.1-sqlite3
E:无法通过glob'php7.1-sqlite3'找到任何软件包.
E:找不到正则表达式'php7.1-sqlite3'的任何软件包.
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package php7.1-sqlite3
E: Couldn't find any package by glob 'php7.1-sqlite3'
E: Couldn't find any package by regex 'php7.1-sqlite3'.
我的php版本也是:PHP 7.1.5-1+deb.sury.org~yakkety+2
.
Also my php version is: PHP 7.1.5-1+deb.sury.org~yakkety+2
.
您确定您的Sqlite配置设置正确吗?因为我在Ubuntu 17.04上遇到了同样的问题,并且使用
Are you sure your Sqlite configurations have been set well? Because I had the same issue on my Ubuntu 17.04 and it was solved with
sudo apt-get install php7.1-sqlite3
我能知道您如何配置sqlite吗?
Can I know how you configured your sqlite?