Nc-previews error

I get this error when running nc-previews. Any idea how to fix this?
Thx.

[ nc-previews ] (Fri Oct 16 17:22:06 CEST 2020)

Scanning AppData for files

+---------+-------+--------------+
| Folders | Files | Elapsed time |
+---------+-------+--------------+
| 115 | 314 | 00:00:09 |
+---------+-------+--------------+

In Application.php line 583:

[Symfony\Component\Console\Exception\NamespaceNotFoundException]
There are no commands defined in the "preview" namespace.


Exception trace:
at /var/www/nextcloud/3rdparty/symfony/console/Application.php:583
Symfony\Component\Console\Application->findNamespace() at /var/www/nextcloud/3rdparty/symfony/console/Application.php:632
Symfony\Component\Console\Application->find() at /var/www/nextcloud/3rdparty/symfony/console/Application.php:236
Symfony\Component\Console\Application->doRun() at /var/www/nextcloud/3rdparty/symfony/console/Application.php:148
Symfony\Component\Console\Application->run() at /var/www/nextcloud/lib/private/Console/Application.php:214
OC\Console\Application->run() at /var/www/nextcloud/console.php:99
require_once() at /var/www/nextcloud/occ:11

You need to install php-imagick package via apt-get on Debian. I’m assuming you are running NextcloudPi.

sudo apt-get update && sudo apt-get -y install php-imagick --no-install-recommends

Thank you for your suggestion.
Yes, I run ncp. I have already installed php-imagick before, just without the --no-install-recommends option.
That did not help.

Afterwards, I just restarted my server and used Preview Generation app to create thumbnails. Works regardless of --no-install-recommends.

  1. Did you install php-imagick within your Docker container? It can be accessed by ssh’ing into your machine and then accessing the container with
    docker exec -it nextcloudpi /bin/bash

  2. Do you have the Preview Generation app enabled under /apps/settings/ ?
    preview

  3. Check /index.php/settings/admin/overview to see if any errors pop up for system dependencies.
    warnings-scan

Thx for you answer. It took me a while to respond because I had big trouble with my installation. I could (hopefully) fix it now.

ad 1) I am not using Docker, but the command line install skript for Debian. Anyhow, I have already manually installed php-imagick. This was not the problem.

ad 2) / 3) brought me to the right path: My apps page was screwed up for whatever reason and I could not see enabled/installed apps. In fact opening the apps page flooded the error log. This is what I fixed now and indeed, the preview app showed as not been installed. I had it installed in much earlier NC versions, though. Anyhow, once re-installed the preview generation runs now :slight_smile: