Update of nextcloud fails

Creating a bug report/issue

Required Information

  • DietPi version | cat /boot/dietpi/.version
    G_DIETPI_VERSION_CORE=8
    G_DIETPI_VERSION_SUB=23
    G_DIETPI_VERSION_RC=2
    G_GITBRANCH=‘beta’
    G_GITOWNER=‘MichaIng’

  • Distro version | echo $G_DISTRO_NAME $G_RASPBIAN
    bookworm 0

  • Kernel version | uname -a
    Linux DietPi4 6.1.21-v8+ #1642 SMP PREEMPT Mon Apr 3 17:24:16 BST 2023 aarch64 GNU/Linux

  • Architecture | dpkg --print-architecture
    arm64

  • SBC model | echo $G_HW_MODEL_NAME or (EG: RPi3)
    RPi 4 Model B (aarch64)

  • Power supply used | (EG: 5V 1A RAVpower)

  • SD card used | (EG: SanDisk ultra)

Additional Information (if applicable)

  • Software title | (EG: Nextcloud)
    Nextcloud
  • Was the software title installed freshly or updated/migrated?
    updated
  • Can this issue be replicated on a fresh installation of DietPi?
    ← If you sent a “dietpi-bugreport”, please paste the ID here →
  • Bug report ID | echo $G_HW_UUID
    a649c44d-eb03-421d-9786-9235958d4284

Steps to reproduce

  1. followed the instruction to upgrade from bullseye to bookworm
    Debian Bookworm has been released – DietPi Blog
  2. executed the bookworm-upgrade script without issues

Expected behaviour

Actual behaviour

  • the upgrade to bookworm seems to have worked, but since them i cant update nextcloud.

Extra details

root@DietPi4:~# sudo -u www-data php /var/www/nextcloud/updater/updater.phar
Nextcloud Updater - version: v25.0.11-5-g06c1bad

Current version is 25.0.12.

Update to Nextcloud 25.0.12 available. (channel: "stable")
Following file will be downloaded automatically: https://download.nextcloud.com/server/releases/nextcloud-25.0.12.zip
Open changelog ↗

Steps that will be executed:
[✔] Check for expected files
[✔] Check for write permissions
[✔] Create backup
[✔] Downloading
[✔] Verify integrity
[✔] Extracting
[✔] Enable maintenance mode
[✔] Replace entry points
[✔] Delete old files
[✔] Move new files in place
[✔] Done

Continue update? [y/N] y

Info: Pressing Ctrl-C will finish the currently running step and then stops the updater.

[✔] Check for expected files
[✔] Check for write permissions
[✔] Create backup
[✔] Downloading
[✔] Verify integrity
[✔] Extracting
[✔] Enable maintenance mode
[✔] Replace entry points
[✔] Delete old files
[✔] Move new files in place
[✔] Done

Update of code successful.

Should the "occ upgrade" command be executed? [Y/n] y
This version of Nextcloud is not compatible with PHP>=8.2.<br/>You are currently running 8.2.7.

thank you for Help

1 Like

Problem might be your NC instance was not up-to-date before doing the Debian destro upgrade. Now NC is trying to update to latest NC25 first before offering NC26.

Can you share following

cat /var/www/nextcloud/lib/versioncheck.php
1 Like

Exactly you somehow need to upgrade NC to v27 as you are on 25.
Sorry for my double post.

yes, the update of nc did not work it was my mistake to assume i need to upgrade to bookworm to get the latest update of nc, but i was wrong.

thank you for Help!

<?php

declare(strict_types=1);

/**
 * @copyright Copyright (c) 2016 Roeland Jago Douma <roeland@famdouma.nl>
 *
 * @author Christoph Wurst <christoph@winzerhof-wurst.at>
 * @author Morris Jobke <hey@morrisjobke.de>
 * @author Roeland Jago Douma <roeland@famdouma.nl>
 *
 * @license GNU AGPL version 3 or any later version
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Affero General Public License as
 * published by the Free Software Foundation, either version 3 of the
 * License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU Affero General Public License for more details.
 *
 * You should have received a copy of the GNU Affero General Public License
 * along with this program. If not, see <http://www.gnu.org/licenses/>.
 *
 */
// Show warning if a PHP version below 7.4 is used,
if (PHP_VERSION_ID < 70400) {
        http_response_code(500);
        echo 'This version of Nextcloud requires at least PHP 7.4<br/>';
        echo 'You are currently running ' . PHP_VERSION . '. Please update your                                                                                                                                                              PHP version.';
        exit(1);
}

// Show warning if >= PHP 8.2 is used as Nextcloud is not compatible with >= PHP                                                                                                                                                              8.2 for now
if (PHP_VERSION_ID >= 80200) {
        http_response_code(500);
        echo 'This version of Nextcloud is not compatible with PHP>=8.2.<br/>';
        echo 'You are currently running ' . PHP_VERSION . '.';
        exit(1);

You can try to bypass the version check

sed -i 's/>= 80200/>= 80300/' /var/www/nextcloud/lib/versioncheck.php

hopefully this will allow update to 25.0.12 as a first step

I hope you have done a backup before playing on configs.

2 Likes

yes as fallback i had an backup but thank you so much, that resloved my problem and saved me time.

1 Like

Did you update to NC26 and NC27 afterwards?

1 Like

sorry for late response, yes updated to the latest version has worked without any issues.
image

2 Likes

Hi,
I have a similar issue I am stuck with v25.0.13 and it says there’s no new version. I tried it with
sed -i ‘s/>= 80200/>= 80300/’ /var/www/nextcloud/lib/versioncheck.php

But it still says there is no update.
What can I do?

Thanks
Hyper

Pls open a new issue and fill all required system information. Thanks for understanding.

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