The Basics
-
Nextcloud Server version (e.g., 29.x.x):
31.0.1 -
Operating system and version (e.g., Ubuntu 24.04):
Arch Linux 6.16 -
Web server and version (e.g, Apache 2.4.25):
4.2.0 -
PHP version (e.g, 8.3):
8.2.29 -
Is this the first time you’ve seen this error? (Yes / No):
Yes -
When did this problem seem to first start?
After system update, which included MariaDB and NC Contacts app. -
Installation method (e.g. AlO, NCP, Bare Metal/Archive, etc.)
Bare metal -
Are you using CloudfIare, mod_security, or similar? (Yes / No)
No
Summary of the issue you are facing:
When running occ upgrade, I receive a fatal error saying, ‘Could not find driver…’ and NC stays in maintenance mode.
Steps to replicate it (hint: details matter!):
-
Run:
sudo -u nextcloud php-legacy /usr/share/webapps/nextcloud/occ upgrade(this is on Arch bare metal) -
Get the error message:
An unhandled exception has been thrown: Doctrine\DBAL\Exception: Failed to connect to the database: An exception occurred in the driver: could not find driver in /usr/share/webapps/nextcloud/lib/private/DB/Connection.php:237