Update won't work

What type of hardware are you using: Raspberry Pi 3, 4+
What YunoHost version are you running: 12.0.16
How are you able to access your server: The webadmin

Describe your issue

Hi. Update won’t work, I’ve got a long list of errors. Where do I begin to solve this?

Share relevant logs or error messages

sudo yunohost tools update
Info: Fetching available upgrades for system packages…
Warning: E: Encountered a section with no Package: header
Warning: E: Problem with MergeList /var/lib/dpkg/status
Warning: E: The package lists or status file could not be parsed or opened.
Error: Unable to update the cache of APT (Debian's package manager). Here is a dump of the sources.list lines, which might help identify problematic lines: 
sources.list:deb http://deb.debian.org/debian bookworm main contrib non-free non-free-firmware
sources.list:deb http://deb.debian.org/debian-security/ bookworm-security main contrib non-free non-free-firmware
sources.list.d/yarn.list:deb [signed-by=/etc/apt/trusted.gpg.d/yarn.gpg] https://dl.yarnpkg.com/debian/ stable main
sources.list.d/raspi.list:deb http://archive.raspberrypi.com/debian/ bookworm main
sources.list.d/yunohost.list:deb [signed-by=/usr/share/keyrings/yunohost-bookworm.gpg] http://forge.yunohost.org/debian/ bookworm stable
sources.list.d/extra_php_version.list:deb [signed-by=/etc/apt/trusted.gpg.d/extra_php_version.gpg] https://packages.sury.org/php/ bookworm main

This sounds like manual edits gone wrong in /var/lib/dpkg/status …

Could you share the output of

sudo ls -l /var/lib/dpkg/status*

and

sudo git diff --no-index /var/lib/dpkg/status-old /var/lib/dpkg/status

(assuming status-old exists)

-rw-r--r-- 1 root root 817124 Nov 21 05:48 /var/lib/dpkg/status
-rw-r--r-- 1 root root 817124 Nov 21 05:41 /var/lib/dpkg/status.bak
-rw-r--r-- 1 root root 817124 Nov 21 05:45 /var/lib/dpkg/status-old

diff --git a/var/lib/dpkg/status-old b/var/lib/dpkg/status
index 57faab0..2f8ebf3 100644
Binary files a/var/lib/dpkg/status-old and b/var/lib/dpkg/status differ

Hope it helps!

Eeeeh, “binary files” ?

Can you share the outputs of

file /var/lib/dpkg/status
file /var/lib/dpkg/status.bak
file /var/lib/dpkg/status-old

Yes:

/var/lib/dpkg/status: data
/var/lib/dpkg/status.bak: data
/var/lib/dpkg/status-old: data

Hmpf I don’t understand how this file can be flagged as “data” instead of text …

Is there anything specific that you know happened around Nov 21 05:48 on the server ?

Can you share the output of head /var/lib/dpkg/status ?

Probably the hour I installed yunohost.
But there’s definitely something wrong with my rpi or my sd card because I’ve tried to install Raspberry Pi Os and I also have weird issues.

I’m gonna stop trying for now, I’ll come back to it later. Thanks for your help @Aleks.

(Fun fact : my 8 years old son came near me while writing this message and said “wow, this is Shi, what’s he’s doing there?” :slight_smile: )

:face_with_tongue:

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