Ncp-dist-upgrade to Bookworm fails

I tried to upgrade to ncp 1.54.0 which worked normally but when I tried the dist-upgrade to Bookworm
I got the massage that php 7.4 still being installed although php 8.3.3 is installed and activated on my system. I updated to Nextcloud 29 2 days before.
How can I safely remove php 7.4 files?

update to v1.54.0 through 'ncp-config' or type 'sudo ncp-update'
Last login: Wed May 1 23:49:58 2024 from 192.168.1.80
pi@nextcloudpi:~ $ sudo ncp-update
Downloading updates
Performing updates
Update root login prevention method...
done.
Fixing trusted proxies list...
done.
Updating PHP package signing key...
OK:1 http://deb.debian.org/debian bullseye InRelease
OK:2 http://deb.debian.org/debian-security bullseye-security InRelease
OK:3 http://archive.raspberrypi.org/debian bullseye InRelease
OK:4 http://deb.debian.org/debian bullseye-updates InRelease
OK:5 https://packages.sury.org/php bullseye InRelease
Paketlisten werden gelesen… Fertig
Paketlisten werden gelesen… Fertig
Abhängigkeitsbaum wird aufgebaut… Fertig
Statusinformationen werden eingelesen… Fertig
Die folgenden Pakete wurden automatisch installiert und werden nicht mehr benötigt:
php8.1-igbinary php8.1-imagick php8.1-phpdbg php8.1-redis php8.1-smbclient php8.2-igbinary php8.2-imagick php8.2-redis
Verwenden Sie »sudo apt autoremove«, um sie zu entfernen.
Die folgenden NEUEN Pakete werden installiert:
gnupg2
0 aktualisiert, 1 neu installiert, 0 zu entfernen und 163 nicht aktualisiert.
Es mĂĽssen 434 kB an Archiven heruntergeladen werden.
Nach dieser Operation werden 453 kB Plattenplatz zusätzlich benutzt.
Holen:1 http://deb.debian.org/debian bullseye/main arm64 gnupg2 all 2.2.27-2+deb11u2 [434 kB]
Es wurden 434 kB in 0 s geholt (958 kB/s).
Vormals nicht ausgewähltes Paket gnupg2 wird gewählt.
(Lese Datenbank ... 50714 Dateien und Verzeichnisse sind derzeit installiert.)
Vorbereitung zum Entpacken von .../gnupg2_2.2.27-2+deb11u2_all.deb ...
Entpacken von gnupg2 (2.2.27-2+deb11u2) ...
gnupg2 (2.2.27-2+deb11u2) wird eingerichtet ...
Trigger fĂĽr man-db (2.9.4-2) werden verarbeitet ...
Warning: apt-key is deprecated. Manage keyring files in trusted.gpg.d instead (see apt-key(8)).
Executing: /tmp/apt-key-gpghome.4buN94m7ml/gpg.1.sh --fetch-keys https://packages.sury.org/php/apt.gpg
gpg: fordere SchlĂĽssel von https://packages.sury.org/php/apt.gpg an
gpg: Schlüssel B188E2B695BD4743: "DEB.SURY.ORG Automatic Signing Key deb@sury.org" nicht geändert
gpg: Anzahl insgesamt bearbeiteter SchlĂĽssel: 1
gpg: unverändert: 1
done.
Installing dependencies...
Paketlisten werden gelesen… Fertig
Abhängigkeitsbaum wird aufgebaut… Fertig
Statusinformationen werden eingelesen… Fertig
Die folgenden Pakete wurden automatisch installiert und werden nicht mehr benötigt:
php8.1-igbinary php8.1-imagick php8.1-phpdbg php8.1-redis php8.1-smbclient php8.2-igbinary php8.2-imagick php8.2-redis
Verwenden Sie »sudo apt autoremove«, um sie zu entfernen.
Die folgenden zusätzlichen Pakete werden installiert:
libutempter0
Die folgenden NEUEN Pakete werden installiert:
libutempter0 tmux
0 aktualisiert, 2 neu installiert, 0 zu entfernen und 163 nicht aktualisiert.
Es mĂĽssen 347 kB an Archiven heruntergeladen werden.
Nach dieser Operation werden 881 kB Plattenplatz zusätzlich benutzt.
Holen:1 http://deb.debian.org/debian bullseye/main arm64 libutempter0 arm64 1.2.1-2 [8.972 B]
Holen:2 http://deb.debian.org/debian bullseye/main arm64 tmux arm64 3.1c-1+deb11u1 [338 kB]
Es wurden 347 kB in 0 s geholt (862 kB/s).
Vormals nicht ausgewähltes Paket libutempter0:arm64 wird gewählt.
(Lese Datenbank ... 50721 Dateien und Verzeichnisse sind derzeit installiert.)
Vorbereitung zum Entpacken von .../libutempter0_1.2.1-2_arm64.deb ...
Entpacken von libutempter0:arm64 (1.2.1-2) ...
Vormals nicht ausgewähltes Paket tmux wird gewählt.
Vorbereitung zum Entpacken von .../tmux_3.1c-1+deb11u1_arm64.deb ...
Entpacken von tmux (3.1c-1+deb11u1) ...
libutempter0:arm64 (1.2.1-2) wird eingerichtet ...
tmux (3.1c-1+deb11u1) wird eingerichtet ...
Trigger fĂĽr man-db (2.9.4-2) werden verarbeitet ...
Trigger fĂĽr libc-bin (2.31-13+rpt2+rpi1+deb11u2) werden verarbeitet ...
done.
Updating obsolete theming URL
done.
Running nc-autoupdate-nc
automatic Nextcloud updates enabled
Update to bookworm available. Type 'sudo ncp-dist-upgrade' to upgrade

Broadcast message from pi@nextcloudpi (pts/0) (Thu May 2 07:36:28 2024):

Update to bookworm available. Type 'sudo ncp-dist-upgrade' to upgrade

NextCloudPi updated to version v1.54.0
pi@nextcloudpi:~ $ sudo ncp-dist-upgrade
error connecting to /tmp//tmux-0/default (No such file or directory)
[exited]
pi@nextcloudpi:~ $ php -v
PHP 8.3.3-1+020240216.17+debian111.gbp87e37b (cli) (built: Feb 16 2024 10:33:07) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.3.3, Copyright (c) Zend Technologies
with Zend OPcache v8.3.3-1+020240216.17+debian111.gbp87e37b, Copyright (c), by Zend Technologies
pi@nextcloudpi:~ $ cat /etc/*-release
PRETTY_NAME="Debian GNU/Linux 11 (bullseye)"
NAME="Debian GNU/Linux"
VERSION_ID="11"
VERSION="11 (bullseye)"
VERSION_CODENAME=bullseye
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"
pi@nextcloudpi:~ $ sudo reboot
Connection to 192.168.1.70 closed by remote host.
Connection to 192.168.1.70 closed.

sudo ncp-dist-upgrade:

This is a dangerous process that is only guaranteed to work properly if you
have not made manual changes in the system. Backup the SD card first and
proceed at your own risk.

Note that this is not a requirement for NCP to continue working properly.
The current distribution will keep receiving updates for some time.

Do you want to continue? [y/N]
y
You still have PHP version 7.4 installed. Please update to the latest supported version of nextcloud (which will also update your PHP version) before proceeding with the distribution upgrade.
Exiting.
root@nextcloudpi:/home/pi#
root@nextcloudpi:/home/pi# php -v
PHP 8.3.3-1+020240216.17+debian111.gbp87e37b (cli) (built: Feb 16 2024 10:33:07) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.3.3, Copyright (c) Zend Technologies
with Zend OPcache v8.3.3-1+020240216.17+debian111.gbp87e37b, Copyright (c), by Zend Technologies
root@nextcloudpi:/home/pi# <

After successfully performing

sudo apt-get purge php7.*

the issue persists

>>> ATTENTION <<<
This is a dangerous process that is only guaranteed to work properly if you
have not made manual changes in the system. Backup the SD card first and
proceed at your own risk.

Note that this is not a requirement for NCP to continue working properly.
The current distribution will keep receiving updates for some time.

Do you want to continue? [y/N]
y
You still have PHP version 7.4 installed. Please update to the latest supported version of nextcloud (which will also update your PHP version) before proceeding with the distribution upgrade.
Exiting.
root@nextcloudpi:/home/pi# 

edit:
I just realized until now up to NC 28.0.5 is supported. Maybe thats the point.

Today i could successfully upgrade my ncp installation to Bookworm following the guide below. It worked although my NC already is on version 29.0.0. I used
“sudo update-alternatives --config php” to adjust my php to v. 8.1.
To be safe, i cloned the installation-SSD before proceding. :wink:

Did ncp-dist-upgrade break your (Raspberry Pi) installation? Here’s how to get it back #1913

1 Like