php artisan migrate 给我 Lumen 错误

Posted

技术标签:

【中文标题】php artisan migrate 给我 Lumen 错误【英文标题】:php artisan migrate giving me error in Lumen 【发布时间】:2018-11-18 13:06:35 【问题描述】:

当我尝试在 Lumen 中迁移时,出现以下错误

Connection.php line 664:

  could not find driver (SQL: select * from information_schema.tables where t  
  able_schema = authors and table_name = migrations)                           

Connector.php line 68:

  could not find driver  

我在 ubuntu 16 上使用 apache2。

【问题讨论】:

你使用什么样的数据库? 我目前使用的mysql数据库 【参考方案1】:

如果您使用MySQL 数据库,请确保您的pdo_mysql php 扩展已启用。

【讨论】:

是的,已启用【参考方案2】:

我通过更新 PHP 版本解决了我的问题。 我正在使用 php7.0 。 我将其更新为 php7.2 。 流明要求最低 php7.1。

我使用了以下命令

sudo apt-get install php7.2-mysql

php 工匠缓存:清除

【讨论】:

以上是关于php artisan migrate 给我 Lumen 错误的主要内容,如果未能解决你的问题,请参考以下文章

执行 php artisan migrate:install报错

php artisan migrate 命令迁移错误

为啥 PHP artisan migrate 命令显示错误?

Lavarel 执行:php artisan migrate时报错

php artisan migrate 抛出 PDOException

laravel php artisan migrate 错误(超时)