Ubuntu 20.04 install script - problem about SQL #2428

Closed
opened 2026-02-05 04:07:02 +03:00 by OVERLORD · 6 comments
Owner

Originally created by @horstepipe on GitHub (Oct 13, 2021).

Describe the bug
Hello
I'm having problems with the install script provided for Ubuntu 20.04.
I also tried it manually via this guidance, unfortunately seeing the same error there:
https://www.howtoforge.de/anleitung/bookstack-ubuntu-1804-lts/

Ater entering
sudo php artisan migrate
I'm getting that error
` Illuminate\Database\QueryException : could not find driver (SQL: select * from information_schema.tables where table_schema = bookstack and table_name = migrations and table_type = 'BASE TABLE')

at /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Database/Connection.php:669
665| // If an exception occurs when attempting to run a query, we'll format the error
666| // message to include the bindings with SQL, which will make this exception a
667| // lot more helpful to the developer instead of just the database's errors.
668| catch (Exception $e) {

669| throw new QueryException(
670| $query, $this->prepareBindings($bindings), $e
671| );
672| }
673|

Exception trace:

1 Doctrine\DBAL\Driver\PDO\Exception::("could not find driver")
/var/www/bookstack/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDO/Exception.php:18

2 Doctrine\DBAL\Driver\PDO\Exception::new()
/var/www/bookstack/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php:44

Please use the argument -v to see more details.
`

MariaDB has this version:
Your MariaDB connection id is 22
Server version: 10.3.31-MariaDB-0ubuntu0.20.04.1 Ubuntu 20.04

I can login with the bookstack credentials fine on MariaDB.

Has anyone some idea?

Best regards

Originally created by @horstepipe on GitHub (Oct 13, 2021). **Describe the bug** Hello I'm having problems with the install script provided for Ubuntu 20.04. I also tried it manually via this guidance, unfortunately seeing the same error there: https://www.howtoforge.de/anleitung/bookstack-ubuntu-1804-lts/ Ater entering `sudo php artisan migrate` I'm getting that error ` Illuminate\Database\QueryException : could not find driver (SQL: select * from information_schema.tables where table_schema = bookstack and table_name = migrations and table_type = 'BASE TABLE') at /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Database/Connection.php:669 665| // If an exception occurs when attempting to run a query, we'll format the error 666| // message to include the bindings with SQL, which will make this exception a 667| // lot more helpful to the developer instead of just the database's errors. 668| catch (Exception $e) { > 669| throw new QueryException( 670| $query, $this->prepareBindings($bindings), $e 671| ); 672| } 673| Exception trace: 1 Doctrine\DBAL\Driver\PDO\Exception::("could not find driver") /var/www/bookstack/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDO/Exception.php:18 2 Doctrine\DBAL\Driver\PDO\Exception::new() /var/www/bookstack/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php:44 Please use the argument -v to see more details. ` MariaDB has this version: Your MariaDB connection id is 22 Server version: 10.3.31-MariaDB-0ubuntu0.20.04.1 Ubuntu 20.04 I can login with the bookstack credentials fine on MariaDB. Has anyone some idea? Best regards
Author
Owner

@horstepipe commented on GitHub (Oct 13, 2021):

the .env file is edited correctly I think:

Database details

DB_HOST=localhost
DB_DATABASE=bookstack
DB_USERNAME=bookstack
DB_PASSWORD=xxx

@horstepipe commented on GitHub (Oct 13, 2021): the .env file is edited correctly I think: # Database details DB_HOST=localhost DB_DATABASE=bookstack DB_USERNAME=bookstack DB_PASSWORD=xxx
Author
Owner

@horstepipe commented on GitHub (Oct 13, 2021):

there was a similar issue here, but that was on MacOS:
https://github.com/BookStackApp/BookStack/issues/1887

@horstepipe commented on GitHub (Oct 13, 2021): there was a similar issue here, but that was on MacOS: https://github.com/BookStackApp/BookStack/issues/1887
Author
Owner

@ssddanbrown commented on GitHub (Oct 13, 2021):

Hi @horstepipe,

  • Can you confirm your exact operating system version? (Ubuntu 18.04 or Ubuntu 20.04)?
  • Can you confirm the output of running ls /etc/php?
@ssddanbrown commented on GitHub (Oct 13, 2021): Hi @horstepipe, - Can you confirm your exact operating system version? (Ubuntu 18.04 or Ubuntu 20.04)? - Can you confirm the output of running `ls /etc/php`?
Author
Owner

@horstepipe commented on GitHub (Oct 13, 2021):

thanks for answering!
This is Ubuntu 20.04.
ls /etc/php shows

`drwxr-xr-x 5 root root 4096 Okt 13 10:38 7.1/

drwxr-xr-x 3 root root 4096 Okt 13 11:05 7.2/

drwxr-xr-x 6 root root 4096 Okt 13 11:10 7.4/

drwxr-xr-x 4 root root 4096 Okt 13 10:44 8.0/
`

Shall I better remove (uninstall properly) all php versions except 7.4?

@horstepipe commented on GitHub (Oct 13, 2021): thanks for answering! This is Ubuntu 20.04. ls /etc/php shows `drwxr-xr-x 5 root root 4096 Okt 13 10:38 7.1/ drwxr-xr-x 3 root root 4096 Okt 13 11:05 7.2/ drwxr-xr-x 6 root root 4096 Okt 13 11:10 7.4/ drwxr-xr-x 4 root root 4096 Okt 13 10:44 8.0/ ` Shall I better remove (uninstall properly) all php versions except 7.4?
Author
Owner

@horstepipe commented on GitHub (Oct 13, 2021):

okay sorry,
I removed all other php packages and now installer script works fine.
thanks for your time and sorry!

@horstepipe commented on GitHub (Oct 13, 2021): okay sorry, I removed all other php packages and now installer script works fine. thanks for your time and sorry!
Author
Owner

@ssddanbrown commented on GitHub (Oct 14, 2021):

No worries, Glad you got it going! Will therefore close this off.

@ssddanbrown commented on GitHub (Oct 14, 2021): No worries, Glad you got it going! Will therefore close this off.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#2428