Cannot update system or install apps

My YunoHost server

Hardware: Old gaming computer
YunoHost version: 11.2.2
I have access to my server : Through SSH or through the webadmin
Are you in a special context or did you perform some particular tweaking on your YunoHost instance ? : no

Description of my issue

Yunohost fails while processing updates in the “System Update” in the admin pages. I get an internal error, and cannot continue on to that page.

Error : "500"
Action : "PUT" /yunohost/api/update/all

Error message:

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://ftp.debian.org/debian bullseye main contrib
sources.list:deb-src http://ftp.debian.org/debian bullseye main contrib
sources.list:deb http://forge.yunohost.org/debian/ bullseye stable
sources.list:deb http://security.debian.org/debian-security bullseye-security main contrib non-free
sources.list:deb-src http://security.debian.org/debian-security bullseye-security main contrib non-free
sources.list:deb http://ftp.debian.org/debian bullseye-updates main contrib non-free
sources.list:deb-src http://ftp.debian.org/debian bullseye-updates main contrib non-free
sources.list:deb http://deb.debian.org/debian/ bullseye main contrib non-free
sources.list.d/caddy-stable.list:deb [signed-by=/usr/share/keyrings/caddy-stable-archive-keyring.gpg] https://dl.cloudsmith.io/public/caddy/stable/deb/debian any-version main
sources.list.d/caddy-stable.list:deb-src [signed-by=/usr/share/keyrings/caddy-stable-archive-keyring.gpg] https://dl.cloudsmith.io/public/caddy/stable/deb/debian any-version main
sources.list.d/immich.list:deb https://apt.postgresql.org/pub/repos/apt __YNH_DEBIAN_VERSION__-pgdg main 16
sources.list.d/nvidia-container-toolkit.list:deb [signed-by=/usr/share/keyrings/nvidia-container-toolkit-keyring.gpg] https://nvidia.github.io/libnvidia-container/stable/deb/$(ARCH) /
sources.list.d/extra_php_version.list:deb https://packages.sury.org/php/ bullseye main

While processing the action the server said:

Fetching available upgrades for system packages...

E: The repository 'https://apt.postgresql.org/pub/repos/apt__YNH_DEBIAN_VERSION__-pgdg Release' does not have a Release file.

W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: https://packages.sury.org/php bullseye InRelease: The following signatures were invalid: EXPKEYSIG B188E2B695BD4743 DEB.SURY.ORG Automatic Signing Key

While trying to sudo apt-get update or sudo yunohost tools update I encounter the same message.

I also cannot install any apps, and here is a paste of my trying to install Immich.

You need to remove the immich.list

I removed immich.list from /etc/apt/sources.list.d/ and got the same error doing sudo apt-get update

Please have a look at Php (sury.org) bloque les mises à jour system

1 Like

Were you able to resolve your issue?

I tried installing debsuryorg-archive-keyring, but apt was unable to locate the package.

Ok, after doing some more looking at this:

W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: https://packages.sury.org/php bullseye InRelease: The following signatures were invalid: EXPKEYSIG B188E2B695BD4743 DEB.SURY.ORG Automatic Signing Key <deb@sury.org>
W: Failed to fetch https://packages.sury.org/php/dists/bullseye/InRelease  The following signatures were invalid: EXPKEYSIG B188E2B695BD4743 DEB.SURY.ORG Automatic Signing Key <deb@sury.org>

I found this solution, which allowed me to successfully apt update and apt upgrade.

Going to the System Update screen in the admin pages still gives me this error, same as in the initial post. Still can’t install apps.

The repository 'https://apt.postgresql.org/pub/repos/apt__YNH_DEBIAN_VERSION__-pgdg Release' does not have a Release file.

I don’t have the time right now to fix this but I’ll take another look later. If anyone knows of the solution for this I would greatly appreciate it.

You have to execute those commands:
curl -sSLo /tmp/debsuryorg-archive-keyring.deb https://packages.sury.org/debsuryorg-archive-keyring.deb
sudo dpkg -i /tmp/debsuryorg-archive-keyring.deb
(see https://packages.sury.org/php/README.txt)

I accidentally copied the wrong thing in the code block. Fixed for posterity.

Deleting immich.list from /etc/apt/sources.list.d again seems to have cleared everything up. That’s where the postgresql error was originating.

It seems that the installation process for Immich breaks when the sury issue is unresolved, and stays broken even when the original issue is fixed. I had tried re-installing it a couple times after attempting some of the fixes and the list obviously reappeared, breaking it in the same way again.

I was able to install Immich after both fixes.

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