Occ: Nextcloud not installed

Nextcloud version (eg, 20.0.5): 20.0.8
Operating system and version (eg, Ubuntu 20.04): Debian 10
Apache or nginx version (eg, Apache 2.4.25): 2.4.38-3+deb10u4
PHP version (eg, 7.4): 7.4

The issue you are facing: if I want to use occ, it says nextcloud isn’t installed

Is this the first time you’ve seen this error? (Y/N): Y

Steps to replicate it:

  1. Install php7.4
  2. edit config for php7.4
  3. update apps
  4. disable maintenance mode in config.php because occ command didnt know how to do it
  5. The nextcloud works, but the occ command says nextcloud isnt installed (in config.php installed is true)

The output of your Nextcloud log in Admin > Logging:

The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!):

$CONFIG = array (
  'instanceid' => 'oca7kz4os314',
  'passwordsalt' => 'secret',
  'secret' => 'secret',
  'trusted_domains' => 
  array (
    0 => '[my url]:30730',
    1 => '[local ip]:30730',
  'datadirectory' => '/opt/ncdata',
  'dbtype' => 'mysql',
  'version' => '',
  'overwrite.cli.url' => 'my url with port 30730',
  'htaccess.RewriteBase' => '/nextcloud',
  'overwriteprotocol' => 'https',
  'dbname' => 'lol',
  'dbhost' => 'localhost:3306',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'lol',
  'dbpassword' => 'Password',
  'installed' => true,
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'twofactor_enforced' => 'true',
  'twofactor_enforced_groups' => 
  array (
  'twofactor_enforced_excluded_groups' => 
  array (
    0 => 'NoTOTP',
  'mail_smtpmode' => 'smtp',
  'mail_smtpsecure' => 'tls',
  'mail_sendmailmode' => 'smtp',
  'mail_domain' => 'lol.lol',
  'mail_smtpauthtype' => 'LOGIN',
  'mail_smtpauth' => 1,
  'mail_smtphost' => 'smtp.lol.lol',
  'mail_smtpport' => '587',
  'mail_smtpname' => 'lol@lol.lol',
  'mail_smtppassword' => 'Password',
  'mail_from_address' => 'nc-my',
  'maintenance' => false,
  'theme' => '',
  'loglevel' => 2,
  'encryption.legacy_format_support' => false,
  'encryption.key_storage_migrated' => false,
  'has_rebuilt_cache' => true,

The output of your Apache/nginx/system log in /var/log/error.log:

There were too much characters sorry for the dropbox-links…

Dieser Text wird ausgeblendet

Both, your admin.log and error.log indicate, that you are missing the APCu module. I guess this was previously installed and you might have forgotten to install it after you installed / updated PHP.

You need to install APCu again.

Please also have a look at the memory_limit parameter in your PHP configuration, as this seems to throw a few fatal errors as well. Nextcloud recommends a minimum of 512MB

I fixed the two issues (I think so it doesnt return any apcu or memory_limit errors)

Apcu was installed, but apt amrked it as not necessary, so I removed via sudo apt autoremove and installed it back again: sudo apt install pp7.4-apcu that fixed the problem. Thanks for your help! I’ll mark this as the solution, if it is ok.