Installation on Raspian (bullseye) fails with The value 'bullseye-security' is invalid for APT::Default-Release as such a release is not available in the sources

I tried to install NextcloudPi via curl -sSL https://raw.githubusercontent.com/nextcloud/nextcloudpi/master/install.sh | sudo bash on my Pi (Raspbian 11 bullseye). This worked before on buster, but I had to reinstall my Pi and chose to use bullseye now.
The final error is “The value ‘bullseye-security’ is invalid for APT::Default-Release as such a release is not available in the sources” (translated from german).
Here is the output from my Pi console (in german):

pi@raspberrypi:~ $ curl -sSL https://raw.githubusercontent.com/nextcloud/nextcloudpi/master/install.sh | sudo bash
OK:1 http://archive.raspberrypi.org/debian bullseye InRelease
OK:2 http://raspbian.raspberrypi.org/raspbian bullseye InRelease               
OK:3 https://deb.nodesource.com/node_16.x bullseye InRelease                   
Paketlisten werden gelesen… Fertig                                
Paketlisten werden gelesen… Fertig
Abhängigkeitsbaum wird aufgebaut… Fertig
Statusinformationen werden eingelesen… Fertig
ca-certificates ist schon die neueste Version (20210119).
git ist schon die neueste Version (1:2.30.2-1).
lsb-release ist schon die neueste Version (11.1.0+rpi1).
sudo ist schon die neueste Version (1.9.5p2-3).
0 aktualisiert, 0 neu installiert, 0 zu entfernen und 0 nicht aktualisiert.
Getting build code...
Klone nach '/tmp/nextcloudpi.MiNl5X/nextcloudpi' ...
remote: Enumerating objects: 10180, done.
remote: Total 10180 (delta 0), reused 0 (delta 0), pack-reused 10180
Empfange Objekte: 100% (10180/10180), 3.12 MiB | 3.72 MiB/s, fertig.
Löse Unterschiede auf: 100% (7209/7209), fertig.

Installing NextCloudPi...
Installing lamp
OK:1 http://archive.raspberrypi.org/debian bullseye InRelease
OK:2 http://raspbian.raspberrypi.org/raspbian bullseye InRelease               
OK:3 https://deb.nodesource.com/node_16.x bullseye InRelease                   
Paketlisten werden gelesen… Fertig                                
Paketlisten werden gelesen… Fertig
Abhängigkeitsbaum wird aufgebaut… Fertig
Statusinformationen werden eingelesen… Fertig
apt-utils ist schon die neueste Version (2.2.4).
cron ist schon die neueste Version (3.0pl1-137).
curl ist schon die neueste Version (7.74.0-1.3+deb11u1).
0 aktualisiert, 0 neu installiert, 0 zu entfernen und 0 nicht aktualisiert.
Paketlisten werden gelesen… Fertig
Abhängigkeitsbaum wird aufgebaut… Fertig
Statusinformationen werden eingelesen… Fertig
apache2 ist schon die neueste Version (2.4.53-1~deb11u1).
0 aktualisiert, 0 neu installiert, 0 zu entfernen und 0 nicht aktualisiert.
Paketlisten werden gelesen… Fertig
E: Der Wert »bullseye-security« ist für APT::Default-Release ungültig, da solch eine Veröffentlichung in den Paketquellen nicht verfügbar ist.

Here ist my sources.list:

pi@raspberrypi:~ $ cat /etc/apt/sources.list
deb http://raspbian.raspberrypi.org/raspbian/ bullseye main contrib non-free rpi
# Uncomment line below then 'apt-get update' to enable 'apt-get source'
#deb-src http://raspbian.raspberrypi.org/raspbian/ bullseye main contrib non-free rpi

Hi @kwenzig

There are probably more .list files in the folder /etc/apt/sources.list.d, with entries that still point to the buster repos. Change these entries from buster to bullseye and run sudo apt update && sudo apt dist-upgrade

Hope that helps…

Thanks for your suggestion. But there’s no buster in use.

pi@raspberrypi:/etc/apt/sources.list.d $ ls -l
insgesamt 8
-rw-r--r-- 1 root root 208 17. Dez 17:11 nodesource.list
-rw-r--r-- 1 root root 191 30. Okt 2021  raspi.list
pi@raspberrypi:/etc/apt/sources.list.d $ cat nodesource.list 
deb [signed-by=/usr/share/keyrings/nodesource.gpg] https://deb.nodesource.com/node_16.x bullseye main
deb-src [signed-by=/usr/share/keyrings/nodesource.gpg] https://deb.nodesource.com/node_16.x bullseye main
pi@raspberrypi:/etc/apt/sources.list.d $ cat raspi.list 
deb http://archive.raspberrypi.org/debian/ bullseye main
# Uncomment line below then 'apt-get update' to enable 'apt-get source'
#deb-src http://archive.raspberrypi.org/debian/ bullseye main

I found this GitHub issue by googeling the error message from your first post… The value 'bullseye-security' is invalid for APT::Default-Release as such a release is not available in the sources · Issue #1437 · nextcloud/nextcloudpi · GitHub

Maybe you could try this workaround: The value 'bullseye-security' is invalid for APT::Default-Release as such a release is not available in the sources · Issue #1437 · nextcloud/nextcloudpi · GitHub

Or this should also work as far as I understand it: The value 'bullseye-security' is invalid for APT::Default-Release as such a release is not available in the sources · Issue #1437 · nextcloud/nextcloudpi · GitHub

I saw this issue, too. But ncp-update or ncp-dist-upgrade didnot work (ncp was never installed on this machine, as bullseye has been a fresh install). Nevertheless: thanks again!

You can download the Nextcloudpi last image for RPI and install without any problem.

https://ownyourbits.com/downloads/NextCloudPi_RPi_03-02-22/

Thanks. But there is already an instance of fhem server running on this Pi and I do not want to install it again if I can avoid that.

Did you also try this exact commands? (from my second link)

sudo ncp-update fix/dist-upgrade-raspbian
sudo ncp-dist-upgrade

Sure, I did.

pi@raspberrypi:/ $ sudo ncp-update fix/dist-upgrade-raspbian
sudo: ncp-update: Befehl nicht gefunden

Befehl nicht gefunden translates to Command not found.