Update Nextcloud from 22.2.7 to 25.0.3

My YunoHost server

Hardware: MiniDesktop PC - 64 Bit
YunoHost version: 11.0.11
I have access to my server : Through SSH | through the webadmin | direct access via keyboard / screen
Are you in a special context or did you perform some particular tweaking on your YunoHost instance ? : no
If your request is related to an app, specify its name and version: nextcloud 22.2.7~ynh1 to 25.0.3~ynh1

Description of my issue

I tried to update Nextcloud with the Web-UI, here is the log: https://paste.yunohost.org/raw/kagogugiku
Error: this version of Nextcloud is not compatible with > PHP 8.0. You are currently running 8.1.14.

I restored and backup of nextcloud from my Raspi to this PC and tried to update it after.

Thanks in advance for any help.

I’m having the same problem. I’m running 11.1.x and the issue persists.

Pastebin: https://paste.yunohost.org/raw/tokiyeduma

Confusingly, sudo -u nextcloud php -v outputs 7.4.33, so I’m really not sure where it’s getting the “you’re running 8.1” from. I did try a fix I found where you manually set the system PHP version to 8.0 using update-alternatives but that didn’t change the result at all – as far as the upgrade script is concerned, 8.1 is what’s used.

Which makes me wonder if perhaps the upgrade script invokes /usr/bin/php8.1 directly?

1 Like

For those interested, here’s why I tried the PHP version change: [Solved] Nextcloud 23 and Php 8.1.2 breaks cron.php - ℹ️ Support - Nextcloud community

Didn’t work though

Also tried a bit, but nothing helps…
Does someone have a clue whats going on or how to fix it… we cannot be the only ones who have that error.

You are not. I ran into the same issue with exactly the same error message related to PHP just a few moments ago, and no other topic online offers solutions to this issue.

1 Like

Is anyone looking at this?

1 Like

Here is my log, after another failed attempt: https://paste.yunohost.org/raw/kunutixaya

For me, the relevant lines show the following:

2023-02-08 21:39:46,374: DEBUG - + NEXTCLOUD_PHP_VERSION=8.1
2023-02-08 21:39:46,375: DEBUG - + cd /var/www/nextcloud
2023-02-08 21:39:46,376: DEBUG - + ynh_exec_as nextcloud php8.1 --define apc.enable_cli=1 occ --no-interaction --no-ansi -V
2023-02-08 21:39:46,377: DEBUG - + local user=nextcloud
2023-02-08 21:39:46,377: DEBUG - + shift 1
2023-02-08 21:39:46,379: DEBUG - ++ whoami
2023-02-08 21:39:46,385: DEBUG - + [[ nextcloud = root ]]
2023-02-08 21:39:46,386: DEBUG - + sudo -u nextcloud php8.1 --define apc.enable_cli=1 occ --no-interaction --no-ansi -V
2023-02-08 21:39:46,594: DEBUG - This version of Nextcloud is not compatible with > PHP 8.0.
You are currently running 8.1.15.+ ynh_exit_properly

2023-02-08 21:39:46,594: DEBUG - + local exit_code=255
2023-02-08 21:39:46,597: DEBUG - + ‘[’ 255 -eq 0 ‘]’
2023-02-08 21:39:47,101: DEBUG - + ynh_clean_setup
2023-02-08 21:39:47,102: DEBUG - + ynh_restore_upgradebackup
2023-02-08 21:39:47,102: DEBUG - + ynh_print_err ‘–message=Upgrade failed.’
2023-02-08 21:39:47,134: WARNING - [Error] Upgrade failed.
2023-02-08 21:39:47,136: DEBUG - + ynh_print_log ‘[Error] Upgrade failed.’
2023-02-08 21:39:47,136: DEBUG - + echo -e ‘[Error] Upgrade failed.’

Does anyone tried to upgrade from testing branch (a PR has been pushed that should fix this issue)

1 Like

Thanks a lot! Worked for me!

sudo yunohost app upgrade nextcloud -u https://github.com/YunoHost-Apps/nextcloud_ynh/tree/testing 
1 Like

Appears to have worked for me as well, thank you!

I checked my server today and the update to Yunohost was available. After updating, I tried to update Nextcloud again and it worked! Thanks to everyone who works in the background!

1 Like

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