Nextcloud no database drivers (sqlite, mysql, or postgresql) installed

I'm trying to install Nextcloud on Ubuntu 20.04 (Linux Mint) but when I execute the php occ command to install Nextcloud, it gives the error "No database drivers (sqlite, mysql, or postgresql) installed" and then exists because of an underhanded exception.

The command I used, found at https://docs.nextcloud.com/server/latest/admin_manual/installation/command_line_installation.html:

sudo -u www-data php occ  maintenance:install --database \
"mysql" --database-name "nextcloud"  --database-user "nc" --database-pass \
"password" --admin-user "admin" --admin-pass "password"

The output that I got:

No database drivers (sqlite, mysql, or postgresql) installed.


An unhandled exception has been thrown:
Exception: Environment not properly prepared. in /var/www/nextcloud/lib/private/Console/Application.php:164
Stack trace:
#0 /var/www/nextcloud/console.php(98): OC\Console\Application->loadCommands()
#1 /var/www/nextcloud/occ(11): require_once('/var/www/nextcl...')
#2 {main}

I am using MariaDB. The credentials are 100% correct.

I installed the "archive file" in apache, version 20.0.3

The UI in the browser gives me this error:

    No database drivers (sqlite, mysql, or postgresql) installed.

    PHP modules have been installed, but they are still listed as missing?

    Please ask your server administrator to restart the web server. 

Am I doing something wrong? What could be the problem here? Thanks!

  • fail2ban
  • llmp
  • pihole
  • nextcloud
  • pivpn

No database drivers (sqlite, mysql, or postgresql) installed.

MySQL and all php modules appeared installed correctly. Unknown cause at the moment.

Ok, lets try purging nextcloud and mysql, then reinstall nextcloud:

If system is critical, back it up 1st:

Then:

#You'll receive some errors regarding mysql not found on nextcloud removal, thats fine as DB is removed during mysql removal.
dietpi-software uninstall 86 114 

#Install Nextcloud
dietpi-software install 114

I am following this link to install ownCloud in Ubuntu 14.04 and faced following errors.

  1. PHP modules have been installed, but they are still listed as missing?Please ask your server administrator to restart the web server.
  2. No database drivers (sqlite, mysql, or postgresql) installed.

In order to resolve this I have followed ownCloud forum instruction but couldn't resolve.

asked Feb 17, 2015 at 6:49

Nextcloud no database drivers (sqlite, mysql, or postgresql) installed

2

Installing php5-mysql solved my problem

apt-get install php5-mysql
service apache2 restart

answered Feb 18, 2015 at 6:30

Nextcloud no database drivers (sqlite, mysql, or postgresql) installed

NeelNeel

3431 gold badge4 silver badges9 bronze badges

David Runge dave at sleepmap.de
Sat Sep 30 17:00:21 UTC 2017
  • Previous message (by thread): [arch-general] Nextcloud installation problems
  • Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

Hi,

On 2017-09-30 18:04:38 (+0200), Peter Nabbefeld wrote:
> 
> Hello,
> 
> I've got a problem trying to install nextcloud (I just want to try it out,
> so I don't have any knowledge about it, yet):
> 
> -----------------------------------------------------------------------------------
> 
> pacman -S nextcloud
> warning: nextcloud-12.0.3-2 is up to date -- reinstalling
> resolving dependencies...
> looking for conflicting packages...
> 
> Packages (1) nextcloud-12.0.3-2
> 
> Total Installed Size:  141.61 MiB
> Net Upgrade Size:        0.00 MiB
> 
> :: Proceed with installation? [Y/n]
> (1/1) checking keys in keyring
> [####################################################################] 100%
> (1/1) checking package integrity
> [####################################################################] 100%
> (1/1) loading package files
> [####################################################################] 100%
> (1/1) checking for file conflicts
> [####################################################################] 100%
> (1/1) checking available disk space
> [####################################################################] 100%
> :: Processing package changes...
> (1/1) reinstalling nextcloud
> [####################################################################] 100%
> :: Running post-transaction hooks...
> (1/2) Updating Nextcloud installation
> Nextcloud is not installed - only a limited number of commands are available
> No database drivers (sqlite, mysql, or postgresql) installed.
> 
> 
> Cannot write into "apps" directory
> This can usually be fixed by giving the webserver write access to the apps
> directory or disabling the appstore in the config file. See
> https://docs.nextcloud.com/server/12/go.php?to=admin-dir_permissions
> 
> PHP module GD not installed.
> Please ask your server administrator to install the module.
> 
> An unhandled exception has been thrown:
> Exception: Environment not properly prepared. in
> /usr/share/webapps/nextcloud/lib/private/Console/Application.php:145
> Stack trace:
> #0 /usr/share/webapps/nextcloud/console.php(99): OC\Console\Application->loadCommands(Object(Symfony\Component\Console\Input\ArgvInput),
> Object(Symfony\Component\Console\Output\ConsoleOutput))
> #1 /usr/share/webapps/nextcloud/occ(11): require_once('/usr/share/weba...')
> #2 {main}
> error: command failed to execute correctly
> (2/2) Arming ConditionNeedsUpdate...
> 
> -----------------------------------------------------------------------------------
> 
> 
> As one of the messages is "PHP module GD not installed. Please ask your
> server administrator to install the module." it's propably not depending on
> a needed module?
> 
> Kind regards
> Peter
I'm luckily still on 12.0.2, so thanks for writing before I would have
upgraded ;-)

The above error is thrown because of the maintainers, imho weird,
decision to add a hook to automatically upgrade the nextcloud
installation.[1]

Gd is disabled in php by default. So in default Arch installations this
hook fails.
However, gd can be activated in the /etc/php/php.ini file.

Anyways: I don't use the default php.ini ('php -c /folder/php.ini') file
for interfacing the instance and have all options disabled in the system
php.ini, which is why this will fail for me each time.

In any case, you can still just use it and go through the wiki article
[2] to read up on how to set it up.

Best,
David

[1] https://bugs.archlinux.org/task/55769
[2] https://wiki.archlinux.org/index.php/Nextcloud

-- 
https://sleepmap.de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://lists.archlinux.org/pipermail/arch-general/attachments/20170930/2e2dc9d8/attachment-0001.asc>

  • Previous message (by thread): [arch-general] Nextcloud installation problems
  • Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

More information about the arch-general mailing list