Error while applying NCP update 1.54.3

I’ve an issue when I try to update NCP from 1.53.3 to 1.54.3.
I open this issue on NCP github ( https://github.com/nextcloud/nextcloudpi/issues/1963 ) but the team din’t found a solution. They thinks It’s likely not very NCP specific.

The error i’m facing is when running ncp-update

Downloading updates
Performing updates
Update root login prevention method...
done.
Fixing trusted proxies list...
done.
Updating PHP package signing key...
Get:1 http://deb.debian.org/debian bullseye InRelease [116 kB]
Get:2 http://security.debian.org/debian-security bullseye-security InRelease [48.4 kB]
Get:3 http://archive.raspberrypi.org/debian bullseye InRelease [39.0 kB]       
Get:4 http://deb.debian.org/debian bullseye-updates InRelease [44.1 kB]        
Get:5 https://packages.sury.org/php bullseye InRelease [7,551 B]               
Get:6 http://security.debian.org/debian-security bullseye-security/main armhf Packages [276 kB]
Get:7 http://security.debian.org/debian-security bullseye-security/main arm64 Packages [275 kB]
Get:8 http://security.debian.org/debian-security bullseye-security/main Translation-en [181 kB]
Get:9 http://security.debian.org/debian-security bullseye-security/non-free Translation-en [472 B]
Get:10 http://deb.debian.org/debian bullseye/main armhf Packages [7,840 kB]
Get:11 http://archive.raspberrypi.org/debian bullseye/main arm64 Packages [314 kB]
Get:12 http://deb.debian.org/debian bullseye/main arm64 Packages [7,956 kB]
Get:13 http://archive.raspberrypi.org/debian bullseye/main armhf Packages [321 kB]
Get:14 https://packages.sury.org/php bullseye/main armhf Packages [248 kB]     
Get:15 https://packages.sury.org/php bullseye/main arm64 Packages [248 kB]     
Get:16 http://deb.debian.org/debian bullseye/main Translation-en [6,236 kB]    
Get:17 http://deb.debian.org/debian bullseye/contrib arm64 Packages [40.8 kB]  
Get:18 http://deb.debian.org/debian bullseye/contrib armhf Packages [40.1 kB]
Get:19 http://deb.debian.org/debian bullseye/contrib Translation-en [46.9 kB]
Get:20 http://deb.debian.org/debian bullseye/non-free arm64 Packages [72.3 kB]
Get:21 http://deb.debian.org/debian bullseye/non-free armhf Packages [56.0 kB]
Get:22 http://deb.debian.org/debian bullseye/non-free Translation-en [92.5 kB]
Get:23 http://deb.debian.org/debian bullseye-updates/main arm64 Packages [16.3 kB]
Get:24 http://deb.debian.org/debian bullseye-updates/main armhf Packages [16.3 kB]
Get:25 http://deb.debian.org/debian bullseye-updates/main Translation-en [10.9 kB]
Fetched 24.5 MB in 9s (2,592 kB/s)                                             
Reading package lists... Error!
W: Problem unlinking the file /var/lib/apt/lists/deb.debian.org_debian_dists_bullseye-updates_InRelease - TransactionStates-Cleanup (21: Is a directory)
E: Could not read from /var/lib/apt/lists/deb.debian.org_debian_dists_bullseye-updates_InRelease - getline (21: Is a directory)
E: The package lists or status file could not be parsed or opened.
Error while applying update 1.54.0. Exiting...

NextcloudPi diagnostics

NextcloudPi version  v1.53.3
NextcloudPi image    NextCloudPi_RaspberryPi_v1.52.0.img
OS                   Debian GNU/Linux 11. 6.1.21-v8+ (aarch64)
automount            yes
USB devices          sda sdb sdc 
datadir              /media/SSD-1/ncdata/data
data in SD           no
data filesystem      btrfs
data disk usage      2.2G/477G
rootfs usage         6.1G/30G
swapfile             /var/swap
dbdir                /var/lib/mysql
Nextcloud check      ok
Nextcloud version    26.0.1.1
HTTPD service        up
PHP service          up
MariaDB service      up
Redis service        up
HPB service          up
Postfix service      up
Internet check       ok
Public IPv4          ***REMOVED SENSITIVE VALUE***
Public IPv6          ***REMOVED SENSITIVE VALUE***
Port 80              open
Port 443             open
IP                   ***REMOVED SENSITIVE VALUE***
Gateway              ***REMOVED SENSITIVE VALUE***
Interface            wlan0
Certificates         ***REMOVED SENSITIVE VALUE***
NAT loopback         yes
Uptime               12days

Nextcloud configuration

{
    "system": {
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": {
            "0": "localhost",
            "7": "nextcloudpi",
            "5": "nextcloudpi.local",
            "8": "nextcloudpi.lan",
            "3": "cloudaebi.ddns.net",
            "11": "2a01:cb19:848c:aa00:ab91:f85e:5062:58c5",
            "1": "192.168.1.50",
            "14": "nextcloudpi",
            "2": "cloudaebi.ddns.net",
            "20": "cloudaebi.ddns.net",
            "21": "cloud.aebi.me"
        },
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "dbtype": "mysql",
        "version": "26.0.1.1",
        "overwrite.cli.url": "https:\/\/cloudaebi.ddns.net\/",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbport": "",
        "dbtableprefix": "oc_",
        "mysql.utf8mb4": true,
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "memcache.local": "\\OC\\Memcache\\Redis",
        "memcache.locking": "\\OC\\Memcache\\Redis",
        "redis": {
            "host": "***REMOVED SENSITIVE VALUE***",
            "port": 0,
            "timeout": 0,
            "password": "***REMOVED SENSITIVE VALUE***"
        },
        "tempdirectory": "\/media\/SSD-1\/ncdata\/data\/tmp",
        "mail_smtpmode": "smtp",
        "mail_smtpauthtype": "LOGIN",
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "preview_max_x": "2048",
        "preview_max_y": "2048",
        "jpeg_quality": "60",
        "overwriteprotocol": "https",
        "maintenance": false,
        "logfile": "\/media\/SSD-1\/ncdata\/data\/nextcloud.log",
        "trusted_proxies": "***REMOVED SENSITIVE VALUE***",
        "loglevel": "2",
        "log_type": "file",
        "mail_sendmailmode": "smtp",
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpport": "465",
        "mail_smtpsecure": "ssl",
        "mail_smtpauth": 1,
        "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
        "mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
        "theme": ""
    }
}

have you an idea to solve the issue ?

Thanks.

Tobias asked you for checking filesystem.
Did you?

Try ro delete the file, and then run apt update again:

sudo rm /var/lib/apt/lists/deb.debian.org_debian_dists_bullseye-updates_InRelease
sudo apt update

See here: [Solved] Unable to parse package file /var/lib/apt/lists

…and here: https://askubuntu.com/questions/816503/w-problem-unlinking-the-file-lists-clean-21-is-a-directory-error-when-runn

EDIT:
I saw the Structure needs cleaning error message on GitHub, which indeed indicates an issue with your file system.

Is this running on an SD-Card?

And than check kernel messages.

The system is runnin on sda1 not Sd-Card
. . .
I try to delete the file
sudo rm /var/lib/apt/lists/deb.debian.org_debian_dists_bullseye-updates_InRelease
rm: cannot remove ‘/var/lib/apt/lists/deb.debian.org_debian_dists_bullseye-updates_InRelease’: Is a directory
. . .

How to check the file system ?

fsck
Checks have to be done on an unmounted filesystem. Therefore booting a life-system on the device in question.
I propose GNOME Partition Editor
Be careful - make backups.

Is this the boot drive? If so you would have to boot from another drive e.g from a linux live system on an usb stick and then run the command from there, or if you have another computer where you could connect the drive to, you could run the command on that computer.

then try:

sudo rm -r /var/lib/apt/lists/deb.debian.org_debian_dists_bullseye-updates_InRelease

I try rm -r :

sudo rm -r /var/lib/apt/lists/deb.debian.org_debian_dists_bullseye-updates_InRelease
rm: cannot remove ‘/var/lib/apt/lists/deb.debian.org_debian_dists_bullseye-updates_InRelease/system.journal’: Is a directory
rm: cannot remove ‘/var/lib/apt/lists/deb.debian.org_debian_dists_bullseye-updates_InRelease/user-1000@b75935030a7247208a15e5d4d46182db-0000000000053f14-000607d70639a87e.journal’: Is a directory
rm: cannot remove ‘/var/lib/apt/lists/deb.debian.org_debian_dists_bullseye-updates_InRelease/system@0006085576fe6892-31e4d8e022c963f8.journal~’: Is a directory

Time to use more drastic methods then :wink:

sudo rm -rf /var/lib/apt/lists/deb.debian.org_debian_dists_bullseye-updates_InRelease

This should force delete it it recursively, even if there are further directories under deb.debian.org_debian_dists_bullseye-updates_InRelease

or even more drastic:

sudo rm -rf /var/lib/apt/lists/*

This should delete absolutely everything under /var/lib/apt/lists/

Both commands can safely be used, since apt will download the lists again when you run sudo apt update.

Unfortunatly it doesn’t work

sudo rm -rf /var/lib/apt/lists/*
rm: cannot remove ‘/var/lib/apt/lists/deb.debian.org_debian_dists_bullseye-updates_InRelease/system.journal’: Is a directory
rm: cannot remove ‘/var/lib/apt/lists/deb.debian.org_debian_dists_bullseye-updates_InRelease/user-1000@b75935030a7247208a15e5d4d46182db-0000000000053f14-000607d70639a87e.journal’: Is a directory
rm: cannot remove ‘/var/lib/apt/lists/deb.debian.org_debian_dists_bullseye-updates_InRelease/system@0006085576fe6892-31e4d8e022c963f8.journal~’: Is a directory

Hmm, I’m running out of ideas, and there are only two things left, at least that I can think of:

  1. The disk is full or almost full. If so, try deleting as many files and folders in /tmp as possible.

  2. Your file system is indeed corrupted.

I check the space of disk, they are not full.
What is the way to repair the file system ?

Just to make sure that /tmp isn’t full, please provide the output of

df -h

As for how to check the filesystem…

As @geoW already said, you can either use fsck directly from the command line, or Gparted if you prefer a GUI.

However, as we have already established as well, you cannot run fsck or Gparted’s filesystem check from a system where the partition you want to check is already mounted, so you will either have to connect the drive to another system and run the check from there, or boot from another drive.

As for booting from another drive…

I’m not sure if you can just boot a live system from a USB stick on a RaspberryPi like you can on an x86 PC, so you may need to flash Raspberry Pi OS or another compatible distribution to an SD card, boot from that, and then run fsck or Gparted from there, but questions about this are probably better asked at https://forums.raspberrypi.com/.

As for getting additional help…

Unless maybe some expert chimes in here, I’d say you’d have to google your way through how to use these tools, and again, maybe also ask at https://forums.raspberrypi.com/, as at least I can’t give you a full walkthrough, and it’s also not exactly Nextcloud related anymore.

Good luck!

Sorry, I am wrong, I have to correct myself, there is no live-media of gparted for arm architecture, so best to follow the path @bb77 explained so nicely.

One hint your nextcloud version is eol before proceeding to update ncp I would consider to update nc stepwise (27,28) first.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.