Upgrade Nextcloud 29 > 33 Failed - Perhaps SQLlite version issue

What app is this about, and its version: Nextcloud 33.0.3 from 29.0.7~ynh2 to 33.0.3~ynh1
What YunoHost version are you running: 12.1.40
What type of hardware are you using: VPS bought online

Describe your issue

I’m trying to catch up on upgrades to Nextcloud - When running an update I get an error related to a Unable to install apt dependencies and specficiatly “php8.3-sqlite3 : Depends: php8.3-common (= 8.3.31-1+0~20260507.80+debian12~1.gbp5ca983) but 8.3.31-3+0~20260514.82+debian11~1.gbp7c4146 is to be installed” I’m trying to understand whether I need to update SQLlite, how to get it to install the version or otherwise resolve the issue and update nextcloud.

Share relevant logs or error messages

https://paste.yunohost.org/raw/raxiholiho

Could you try this :

Thanks. I’ve already resolved previous issues with updating the signing keys for sury.org and done an apt update - It reports that all packages are up to date

What I don’t understand is why the error I mention could be occuring - why would the script say “ 8.3.31-3+0~20260514.82+debian11~1.gbp7c4146 is to be installed” - when i am already on Debian12 (Bookworm ) .

The debug message immediately before the warning is “ DEBUG - + apt-get --assume-yes --quiet -o=Acquire::Retries=3 -o=Dpkg::Use-Pty=0 --no-remove --option Dpkg::Options::=–force-confdef --option Dpkg::Options::=–force-confold install php8.3-sqlite3 php8.3-smbclient --dry-run”

I don’t quite understand this but executing the script manually points out that php8.3-sqlite3 : Depends on php8.3-common and that (= 8.3.31-1+0~20260507.80+debian12~1.gbp5ca983) but 8.3.31-3+0~20260514.82+debian11~1.gbp7c4146 is to be installed

Can I manually update the version of php8.3-common to the later Debian 12 version? If so how could I do this?

I’m wondering whether there is actually an issue with the script - I’m operating outside my area of compentence so I’m not sure that this is saying what I think it is but I ran this command
apt-cache policy php8.3

I get the following results which suggests that I already have an uptodate version of
php8.3:
Installed: 8.3.31-3+0~20260514.82+debian12~1.gbp7c4146

Just for confirmation - I executed these commands again just show the results

abeorch@ginestes:~$ sudo yunohost tools regen-conf apt
Warning: The configuration file ‘/etc/apt/sources.list.d/extra_php_version.list’ has been manually modified and will not be updated
apt:
applied:
pending:
/etc/apt/sources.list.d/extra_php_version.list:
status: modified
abeorch@ginestes:~$ sudo apt update
Hit:1 https://dl.yarnpkg.com/debian stable InRelease
Hit:3 Index of /debian bookworm InRelease
Hit:4 https://packages.sury.org/php bookworm InRelease
Hit:2 Index of /debian/ bookworm InRelease
Reading package lists… Done
Building dependency tree… Done
Reading state information… Done
1 package can be upgraded. Run ‘apt list --upgradable’ to see it.
abeorch@ginestes:~$ sudo apt list --upgradable
Listing… Done
libconfig-inifiles-perl/oldstable 3.000003-2 all [upgradable from: 3.000003-1]
N: There is 1 additional version. Please use the ‘-a’ switch to see it

when I run abeorch@ginestes:~$ sudo apt-get --assume-yes --quiet -o=Acquire::Retries=3 -o=Dpkg::Use-Pty=0 --no-remove --option Dpkg::Options::=–force-confdef --option Dpkg::Options::=–force-confold install php8.3-common --dry-run

I get the following results -
Reading package lists…
Building dependency tree…
Reading state information…
php8.3-common is already the newest version (8.3.31-3+0~20260514.82+debian11~1.gbp7c4146).
php8.3-common set to manually installed.
The following packages were automatically installed and are no longer required:
libllvm11 postgresql-13 postgresql-client-13
Use ‘sudo apt autoremove’ to remove them.
0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.

This suggests that maybe I am not using the correct version of php8.3-common - it appears to report a debian 11 version rather than debian 12 version

What does return grep -R "bullseye" /etc/apt/sources.list /etc/apt/sources.list.d/ ?

Doesn’t return anything - there are no mentions of bullseye in my list files - they are all bookworm references

Should I be able to reinstall php8.3common? I tried executing “sudo apt-get reinstall php8.3-common” but it returned “Reinstallation of php8.3-common is not possible, it cannot be downloaded. “

This is really weird…

apt-cache policy php8.3-common

Maybe cleaning the apt cache…
Try first

yunohost tools basic-space-cleanup

dpkg -l | grep php8.3
Is there a mix of debian 11 and debian 12 ?

That returns:

php8.3-common:
Installed: 8.3.31-3+0~20260514.82+debian11~1.gbp7c4146
Candidate: 8.3.31-3+0~20260514.82+debian11~1.gbp7c4146
Version table:
*** 8.3.31-3+0~20260514.82+debian11~1.gbp7c4146 100
100 /var/lib/dpkg/status
8.3.31-1+0~20260507.80+debian12~1.gbp5ca983 500
500 https://packages.sury.org/php bookworm/main arm64 Packages

I don’t completely understand this response - could you explain it to me ? I don’t quite understand the 100/500 values

I guess the problem is the debian 11 version is newest (8.3.31-3+0) than the debian 12 version (8.3.31-1+0) and apt doesn’t want to downgrade…

This is how apt handles priorities : Pinning: Apt’s Best Kept Secret

This might work :crossed_fingers:
sudo apt install --allow-downgrades php8.3-common=8.3.31-1+0~20260507.80+debian12~1.gbp5ca983

That results in

The following packages were automatically installed and are no longer required:
libarchive13 libc-client2007e libicu67 libldap-2.4-2 libldb2 libsmbclient libtalloc2 libtdb1 libtevent0
libwbclient0 mlock php7.4-gd samba-common samba-libs smbclient
Use ‘sudo apt autoremove’ to remove them.
The following packages will be REMOVED:
firefly-iii-ynh-deps nextcloud-ynh-deps php8.3 php8.3-apcu php8.3-bcmath php8.3-bz2 php8.3-cli
php8.3-curl php8.3-fpm php8.3-gd php8.3-gmp php8.3-igbinary php8.3-imagick php8.3-imap php8.3-intl
php8.3-ldap php8.3-mbstring php8.3-mysql php8.3-opcache php8.3-readline php8.3-redis php8.3-xml
php8.3-zip roundcube-ynh-deps webtrees-ynh-deps
The following packages will be DOWNGRADED:
php8.3-common

I’m a bit concerned about what will get removed (but I’m doing this on test so will just have a go and see what happens)