2
respostas

Erro no php artisan migrate

PHP Warning: PHP Startup: Unable to load dynamic library 'pdo_sqlite' (tried: /usr/lib/php/20190902/pdo_sqlite (/usr/lib/php/20190902/pdo_sqlite: cannot open shared object file: No such file or directory), /usr/lib/php/20190902/pdo_sqlite.so (/usr/lib/php/20190902/pdo_sqlite.so: cannot open shared object file: No such file or directory)) in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library 'sqlite3' (tried: /usr/lib/php/20190902/sqlite3 (/usr/lib/php/20190902/sqlite3: cannot open shared object file: No such file or directory), /usr/lib/php/20190902/sqlite3.so (/usr/lib/php/20190902/sqlite3.so: cannot open shared object file: No such file or directory)) in Unknown on line 0

Illuminate\Database\QueryException

could not find driver (SQL: PRAGMA foreign_keys = ON;)

at vendor/laravel/framework/src/Illuminate/Database/Connection.php:678 674▕ // If an exception occurs when attempting to run a query, we'll format the error 675▕ // message to include the bindings with SQL, which will make this exception a 676▕ // lot more helpful to the developer instead of just the database's errors. 677▕ catch (Exception $e) { ➜ 678▕ throw new QueryException( 679▕ $query, $this->prepareBindings($bindings), $e 680▕ ); 681▕ } 682▕

  +38 vendor frames 

39 artisan:37 Illuminate\Foundation\Console\Kernel::handle()

Whoops\Exception\ErrorException

PHP Startup: Unable to load dynamic library 'sqlite3' (tried: /usr/lib/php/20190902/sqlite3 (/usr/lib/php/20190902/sqlite3: cannot open shared object file: No such file or directory), /usr/lib/php/20190902/sqlite3.so (/usr/lib/php/20190902/sqlite3.so: cannot open shared object file: No such file or directory))

  +1 vendor frames 

2 [internal]:0 Whoops\Run::handleShutdown()

2 respostas

Resolvido com o comando. sudo apt-get install php-sqlite3

Siga o que o instrutor mostrou no "Capitulo 1: Preparando o ambiente". Você precisa descomentar a linha extension=pdo_sqlite