Unhandled Exeptions after installer run successfully

I am trying to install Nextcloud via an Ansible Playbook on a FreeBSD host. Everything looks good until the occ installer routine is running. And I really cant see my mistake after hours of debugging.
I skip the Ansible part and this is what is happening when I run the last part manually.

The status is

  • Nginx with php should be fine
  • User and DB in Postgres created.

su - postgres
$ psql
psql (12.4)
postgres=# \l
List of databases
Name | Owner | Encoding | Collate | Ctype | Access privileges
-----------±----------±---------±--------±------±----------------------
mycloud | nextcloud | UTF8 | C | C |
postgres | postgres | UTF8 | C | C |
template0 | postgres | UTF8 | C | C | =c/postgres +
| | | | | postgres=CTc/postgres
template1 | postgres | UTF8 | C | C | =c/postgres +
| | | | | postgres=CTc/postgres

OCC does something

sudo -u www php occ status
The process control (PCNTL) extensions are required in case you want to interrupt long running commands - see http://php.net/manual/en/book.pcntl.php
Nextcloud is not installed - only a limited number of commands are available

  • installed: false
  • version: 19.0.3.1
  • versionstring: 19.0.3
  • edition:

Then I start the installer

sudo -u www php occ -vvv maintenance:install --database “pgsql” --database-name mycloud --database-user nextcloud --database-pass geheim --admin-user admin77 --admin-pass geheim
The process control (PCNTL) extensions are required in case you want to interrupt long running commands - see http://php.net/manual/en/book.pcntl.php
Nextcloud was successfully installed

No errors. But when I then try to do something I get errors. The simplest way to reproduce it is this:

sudo -u www php occ status
An unhandled exception has been thrown:
OCP\AppFramework\QueryException: Could not resolve OCA\Settings\AppInfo\Application! Class OCA\Settings\AppInfo\Application does not exist in /usr/local/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php:107
Stack trace:
#0 /usr/local/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(116): OC\AppFramework\Utility\SimpleContainer->resolve()
#1 /usr/local/www/nextcloud/lib/private/ServerContainer.php(149): OC\AppFramework\Utility\SimpleContainer->query()
#2 /usr/local/www/nextcloud/lib/base.php(738): OC\ServerContainer->query()
#3 /usr/local/www/nextcloud/lib/base.php(1095): OC::init()
#4 /usr/local/www/nextcloud/console.php(49): require_once(’/usr/local/www/…’)
#5 /usr/local/www/nextcloud/occ(11): require_once(’/usr/local/www/…’)

I am sure I miss something but dont find any additional hints where to look

any ideas?