NextCloud upgrade failed, now it's gone

My YunoHost server

Hardware: VPS bought online
YunoHost version: 11.2.3
I have access to my server : Through SSH | through the webadmin
Are you in a special context or did you perform some particular tweaking on your YunoHost instance ? : no

Description of my issue

My NextCloud upgrade failed, the backup couldn’t be restored, now NextCloud seems to be gone!

Here are the logs:
https://paste.yunohost.org/raw/ahiyeyocis

2023-08-15 03:14:54,977: WARNING - 627612 The following packages have unmet dependencies:
2023-08-15 03:14:54,980: WARNING - 627612 php8.1-imap : Depends: libc-client2007e but it is not going to be installed
2023-08-15 03:14:54,981: WARNING - 627612 smbclient : Depends: samba-common (= 2:4.17.10+dfsg-0+deb12u1) but it is not going to be installed
2023-08-15 03:14:54,981: WARNING - 627612 Depends: samba-libs (= 2:4.17.10+dfsg-0+deb12u1) but it is not going to be installed
2023-08-15 03:14:54,983: WARNING - 627612 Depends: libc6 (>= 2.34) but 2.31-13+deb11u6 is to be installed
2023-08-15 03:14:54,983: WARNING - 627613 Depends: libsmbclient (>= 2:4.10.0+dfsg) but it is not going to be installed
2023-08-15 03:14:54,986: WARNING - 627613 Depends: libtalloc2 (>= 2.3.4~) but it is not going to be installed
2023-08-15 03:14:54,986: WARNING - 627613 Depends: libtevent0 (>= 0.13.0~) but it is not going to be installed
2023-08-15 03:14:54,987: DEBUG - 627616 + ynh_die ‘–message=Unable to install dependencies’
2023-08-15 03:14:55,048: DEBUG - 627682 + echo ‘Unable to install dependencies’
2023-08-15 03:14:55,048: DEBUG - 627682 + exit 1
2023-08-15 03:14:55,048: DEBUG - 627682 + ynh_exit_properly
2023-08-15 03:14:55,048: DEBUG - 627682 + [[ restore =~ ^install$|^upgrade$|^restore$ ]]
2023-08-15 03:14:55,049: WARNING - 627683 Unable to install dependencies
2023-08-15 03:14:55,561: DEBUG - 628197 + exit 1
2023-08-15 03:14:56,567: WARNING - 629203 Could not restore nextcloud: An error occured inside the app restore script
2023-08-15 03:14:56,570: DEBUG - 629206 The operation ‘Restore ‘nextcloud’ from a backup archive’ could not be completed. Please share the full log of this operation using the command ‘yunohost log share 20230815-030551-backup_restore_app-nextcloud’ to get help

What can I do to troubleshoot and/or fix this? Any help or insights would be greatly appreciated, thank you! :slightly_smiling_face:

It’s a bit ridiculous, but try to manually install the packages it says that are “not going to be installed”:

sudo apt install libc-client2007e samba-libs libc6 libsmbclient libtalloc2 libtevent0

Thanks for the suggestion! Here’s the output:

libc6 is already the newest version (2.31-13+deb11u6).
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
libsmbclient : Depends: libtalloc2 (>= 2.3.4~) but 2.3.1-2+b1 is to be installed
Depends: libtevent0 (>= 0.13.0~) but 0.10.2-1 is to be installed
samba-libs : Depends: libc6 (>= 2.34) but 2.31-13+deb11u6 is to be installed
Depends: libgnutls30 (>= 3.7.5) but 3.7.1-5+deb11u3 is to be installed
Depends: libicu72 (>= 72.1~rc-1~) but it is not installable
Depends: libjansson4 (>= 2.14) but 2.13.1-1.1 is to be installed
Depends: libldap-2.5-0 (>= 2.5.4) but it is not installable
Depends: libldb2 (>= 2:2.6.2) but it is not going to be installed
Depends: libtalloc2 (>= 2.3.4~) but 2.3.1-2+b1 is to be installed
Depends: libtdb1 (>= 1.4.7~) but it is not going to be installed
Depends: libtevent0 (>= 0.13.0) but 0.10.2-1 is to be installed
Depends: libwbclient0 (>= 2:4.5.0+dfsg) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

Also, I tried to restore NextCloud, but that also didn’t work:

Reinstalling dependencies…

E: Packages need to be removed but remove is disabled.

The following packages have unmet dependencies:

php8.1-bcmath : Depends: php8.1-common (= 8.1.22-1+0~20230815.49+debian11~1.gbp8da143) but 8.1.22-1+0~20230814.48+debian11~1.gbp8da143 is to be installed

php8.1-bz2 : Depends: php8.1-common (= 8.1.22-1+0~20230815.49+debian11~1.gbp8da143) but 8.1.22-1+0~20230814.48+debian11~1.gbp8da143 is to be installed

php8.1-curl : Depends: php8.1-common (= 8.1.22-1+0~20230815.49+debian11~1.gbp8da143) but 8.1.22-1+0~20230814.48+debian11~1.gbp8da143 is to be installed

php8.1-fpm : Depends: php8.1-common (= 8.1.22-1+0~20230815.49+debian11~1.gbp8da143) but 8.1.22-1+0~20230814.48+debian11~1.gbp8da143 is to be installed

php8.1-gd : Depends: php8.1-common (= 8.1.22-1+0~20230815.49+debian11~1.gbp8da143) but 8.1.22-1+0~20230814.48+debian11~1.gbp8da143 is to be installed

php8.1-gmp : Depends: php8.1-common (= 8.1.22-1+0~20230815.49+debian11~1.gbp8da143) but 8.1.22-1+0~20230814.48+debian11~1.gbp8da143 is to be installed

php8.1-imap : Depends: php8.1-common (= 8.1.22-1+0~20230815.49+debian11~1.gbp8da143) but 8.1.22-1+0~20230814.48+debian11~1.gbp8da143 is to be installed

Depends: libc-client2007e but it is not going to be installed

php8.1-intl : Depends: php8.1-common (= 8.1.22-1+0~20230815.49+debian11~1.gbp8da143) but 8.1.22-1+0~20230814.48+debian11~1.gbp8da143 is to be installed

php8.1-ldap : Depends: php8.1-common (= 8.1.22-1+0~20230815.49+debian11~1.gbp8da143) but 8.1.22-1+0~20230814.48+debian11~1.gbp8da143 is to be installed

php8.1-mysql : Depends: php8.1-common (= 8.1.22-1+0~20230815.49+debian11~1.gbp8da143) but 8.1.22-1+0~20230814.48+debian11~1.gbp8da143 is to be installed

php8.1-zip : Depends: php8.1-common (= 8.1.22-1+0~20230815.49+debian11~1.gbp8da143) but 8.1.22-1+0~20230814.48+debian11~1.gbp8da143 is to be installed

smbclient : Depends: samba-common (= 2:4.17.10+dfsg-0+deb12u1) but it is not going to be installed

Depends: samba-libs (= 2:4.17.10+dfsg-0+deb12u1) but it is not going to be installed

Depends: libc6 (>= 2.34) but 2.31-13+deb11u6 is to be installed

Depends: libsmbclient (>= 2:4.10.0+dfsg) but it is not going to be installed

Depends: libtalloc2 (>= 2.3.4~) but it is not going to be installed

Depends: libtevent0 (>= 0.13.0~) but it is not going to be installed

Unable to install dependencies

Could not restore nextcloud: An error occured inside the app restore script

The line regarding deb12u1 caught my eye:

smbclient : Depends: samba-common (= 2:4.17.10+dfsg-0+deb12u1) but it is not going to be installed

Something to do with installing a Debian 12 update?

It would be nice to at least get the backup restored for now, if you or anyone has suggestions on how to do that? :thinking: :smile:

Hello, are you running Yunohost out of a Debian 12 ?
Yunohost Stable works from a debian 11, that might be your problem with versions.

Are you running Yunohost testing ?

Definitely look like something happened and somehow you’re half-on-bookworm/debian12 …

We can probably get some more obvious hints looking at apt policy samba-libs

Thanks for the input/feedback everyone. :hugs:

Indeed, it does look like I have a Debian 12 source. :confused: :sob:

I ran apt policy samba-libs and it says:

Version table:
2:4.17.10+dfsg-0+deb12u1 500
500 http://security.debian.org/debian-security stable-security/main amd64 Packages

This might be better for a StackOverflow question, but how would I revert this?

Just remove the source from /etc/apt/sources.list?

Or something like this (just guessing at the steps):

  • find/uninstall all Debian 12 packages
  • remove the Debian 12 source from /etc/apt/sources.list
  • add removed packages on Debian 11

:thinking: :grimacing: :sweat_smile:

I managed to fix this! :raised_hands:

I doubt anyone else will run into this issue, but if so, here are the steps I ended up taking:

  • I removed deb http://security.debian.org/debian-security stable-security main contrib non-free from/etc/apt/sources.list
  • I ran:
    • sudo apt update
    • sudo apt remove samba-common
    • sudo apt install samba-common
  • Then I restored NextCloud from the webadmin and everything is working as expected!

I’m really happy NextCloud is back up and running since we use it for our calendar and todo syncing, and our backups too.

I’m really grateful for the auto-backup before upgrading functionality, and the restore functionality too! :pray: :clap: :100:

5 Likes

Instead of removing the line in /etc/apt/sources.list you could change it to (replace stable with bullseye)

deb http://security.debian.org/debian-security bullseye-security main contrib non-free

This is how it looks in /etc/apt/sources.list on my YunoHost.

1 Like

Ah, good tip, thanks for the suggestion! :+1:

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