[Ubuntu 22.04] On mailinabox install fail with Nextcloud checksum did NOT matc

Upgrading to Nextcloud version 23.0.12

sha1sum: WARNING: 1 computed checksum did NOT match

Download of https://download.nextcloud.com/server/releases/nextcloud-23.0.12.zip did not match expected checksum.
Found:
9b766a33b5d863ade22ee4ee34585d7df93552da /tmp/nextcloud.zip

Expected:
d138641b8e7aabebe69bb3ec7c79a714d122f729 /tmp/nextcloud.zip

Has some seen this issue before?
How to workaround it?

To reproduce run on freshly installed digital ocean Ubuntu 22.04 the installation script:
curl -s https://mailinabox.email/setup.sh | sudo bash
or on rerunning the mailinabox command

Did run the installation on an other server with the same result.
Some hours ago this issue was not showing up on the same workflow.

Installing nsd (DNS server)…
Generating DNSSEC signing keys…
Installing Postfix (SMTP server)…
Installing Dovecot (IMAP server)…
Creating new user database: /home/user-data/mail/users.sqlite
Installing OpenDKIM/OpenDMARC…
Installing SpamAssassin…
Installing Nginx (web server)…
Installing Roundcube (webmail)…
wal
Installing Nextcloud (contacts/calendar)…

Upgrading to Nextcloud version 23.0.12

sha1sum: WARNING: 1 computed checksum did NOT match

Download of https://download.nextcloud.com/server/releases/nextcloud-23.0.12.zip did not match expected checksum.
Found:
9b766a33b5d863ade22ee4ee34585d7df93552da /tmp/nextcloud.zip

Expected:
d138641b8e7aabebe69bb3ec7c79a714d122f729 /tmp/nextcloud.zip

Workaround could be download the necsloud, create the sha1 has to change it in the /root/mailinabox/setup/nextcloud.sh script

sha1sum nextcloud*
9b766a33b5d863ade22ee4ee34585d7df93552da nextcloud-23.0.12.zip

nextcloud_ver=23.0.12
#nextcloud_hash=d138641b8e7aabebe69bb3ec7c79a714d122f729
nextcloud_hash=9b766a33b5d863ade22ee4ee34585d7df93552da

but if fail
nstalling Nextcloud (contacts/calendar)…
PHP Warning: Undefined array key “version” in Command line code on line 1

Upgrading to Nextcloud version 23.0.12

replace /usr/local/lib/nextcloud/index.php? [y]es, [n]o, [A]ll, [N]one, [r]ename: A
/usr/local/lib/nextcloud/core/doc/admin/configuration_files/external_storage/local.html bad CRC 9e2e9359 (should be 05fb6ae6)

I encountered this too. It happens when upgrading from a Nextcloud version 22 or older. The solution mentioned in the second post is not needed/valid anymore, it has been fixed by the team now. But the CRC error remains, together with 2 new errors… I’ve created a bug report on them.

But in the meantime, this is how I solved it:

To fix the bug mentioned in the first post you must manually refresh the mailinabox files (at least until they publish a new release)

cd ~/mailinabox
sudo git pull

Next edit the nextcloud file:

sudo nano setup/nextcloud.sh

Go down to the line that says:

# Extract ownCloud/Nextcloud
unzip -q /tmp/nextcloud.zip -d /usr/local/lib

Change it to:

unzip -q /tmp/nextcloud.zip -d /usr/local/lib -x nextcloud/core/doc/admin/configuration_files/external_storage/local.html

This will fix the bad CRC error (this is Nextcloud’s fault).

Go further down to this part:

if [[ ${CURRENT_NEXTCLOUD_VER} =~ ^22 ]]; then
	InstallNextcloud 23.0.12 7aa5d61632c1ccf4ca3ff00fb6b295d318c05599 4.1.0 697f6b4a664e928d72414ea2731cb2c9d1dc3077 3.2.2 ce4030ab57f523f33d5396c6a81396d440756f5f 3.0.0 22cabc88b6fc9c26dad3b46be1a652979c9fcf15
	CURRENT_NEXTCLOUD_VER="23.0.12"
fi

And change the long line to this:

InstallNextcloud 23.0.12 9b766a33b5d863ade22ee4ee34585d7df93552da 4.1.0 697f6b4a664e928d72414ea2731cb2c9d1dc3077 3.2.2 ce4030ab57f523f33d5396c6a81396d440756f5f 3.0.0 0df781b261f55bbde73d8c92da3f99397000972f

This will fix two computed checksum did not match errors (those are MIAB’s fault).

(use ctrl+O and ctrl+X to save and exit)

Hope I got all that code correct :confounded: and that it works for you too

1 Like

Just a point, if Nextcloud have changed the directory structure inside the zip it will produce a different checksum, so I would say both are Nextcloud’s faults. Not that it solves anything and is just my opinion :blush:

Not sure what they did, but it’s definitely an issue on their end.

See here:

https://help.nextcloud.com/t/crc-failed-on-file-nextcloud-23-0-12-zip/167176

and here:

https://github.com/nextcloud/server/issues/39636

Hey good find @miabuser! My initial thought was the same as @matidau’s, but I must be fair to the Nextcloud team this time.

The first faulty checksum is identical to the checksum on the line below… hmm… And the second faulty checksum (at the end of the line) differs from the lines above and below, even though they all refer to version 3.0.0 of something… hmm…

Meh, anyone can mix things up, even @michael-heuberger :wink: He does a good job. We love him. You rock Michael!

Hi, I hae a featurer reauest.
It would be nice if the installation script would give a warning instead, and would make it possible to continue the installation. And override the error messages with something like “yes continue anyway or no abord installation”.
Because otherwise, the install script stops.
I did a workaround where I disable in the setup part the installation of next cloud to be able to install mailinabox at all.
I guess I am not the only one benefiting from this feature request.

I made this change and it still failed

sha1sum: WARNING: 1 computed checksum did NOT match
------------------------------------------------------------
Download of https://download.nextcloud.com/server/releases/nextcloud-23.0.12.zip did not match expected checksum.
Found:
d138641b8e7aabebe69bb3ec7c79a714d122f729  /tmp/nextcloud.zip

Expected:
9b766a33b5d863ade22ee4ee34585d7df93552da  /tmp/nextcloud.zip

Have NextCloud updated their archives again? I swapped in this new hash and it worked, however this clearly undermines the security that this check is meant to provide. Is there not a location where the checksum can be downloaded from reliably?

Have you actually changed the file? I have checked the online version and the SHA-1 sum is:

d138641b8e7aabebe69bb3ec7c79a714d122f729

The 207th line in the setup/nextcloud.sh file after the fix:

InstallNextcloud 23.0.12 d138641b8e7aabebe69bb3ec7c79a714d122f729 4.1.0 697f6b4a664e928d72414ea2731cb2c9d1dc3077 3.2.2 ce4030ab57f523f33d5396c6a81396d440756f5f 3.0.0 0df781b261f55bbde73d8c92da3f99397000972f

1 Like

Apparently, yes. I had the old file in my downloads folder. Now Nextcloud have fixed the CRC error - yay!

They provide a bunch of different sums along with the release file, but prior to fixing the CRC error the checksums were incorrect too… Guess that broken zip just sneaked into the system.

I’ve just upgraded to 22.04 and restored for miab v63 and can’t continue the installation due to this problem and have tried editing the nextcloud.sh script ti hack in the right sum but still fails. Wondering how to skip the nextcloud updates so that issue can be resolved in later updates?

Note: Above suggestions didn’t seem to work in just editing nextcloud.sh

ERROR during installation:

Upgrading to Nextcloud version 23.0.12
sha1sum: WARNING: 1 computed checksum did NOT match
------------------------------------------------------------
Download of https://download.nextcloud.com/server/releases/nextcloud-23.0.12.zip did not match expected checksum.

Found:
d138641b8e7aabebe69bb3ec7c79a714d122f729 /tmp/nextcloud.zip

Expected:
7aa5d61632c1ccf4ca3ff00fb6b295d318c05599 /tmp/nextcloud.zip

I encountered this issue, too. Fixed by following instructions of @allejok, with additional changes to checksum on line 207 as noted by @slawek-k.

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