[SOLVED] Upgrade of nextcloud: Unable to install dependencies from 22.2.7~ynh1 to 24.0.5~ynh1

My YunoHost server

Hardware: proxmox server
YunoHost version: 11.0.9.15 (stable)
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

This instance was restored from an archive from August. previous install was on barebone. I had to change infrastructure with a proxmox base system because of the necessary flexibility required for further usage.
Trying to reinstall, I ran into a error on upgrade. I had to run:

sudo yunohost tools shell -c "from yunohost.permission import permission_delete; permission_delete('nextcloud__2.api', force=True)"

Then I tried to upgrade the install to latest version.
Below is the link to the report.
It states that it was impossible to resolve the dependencies to satisfy the upgrade. It seems there is a lock on uninstalling some packages, I wonder what to do next.
Any advice is welcome.

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

Log report

Then let’s try to sudoapt remove php-igbinary php-redis --dry-run, but sounds like wallabag may not be happy about this

Hi, thanks for your suggestion.
It removed also the dependencies of wallabag and nextcloud.

The following packages will be REMOVED:
  nextcloud--2-ynh-deps php-igbinary php-redis wallabag2-ynh-deps
0 upgraded, 0 newly installed, 4 to remove and 0 not upgraded.
Remv nextcloud--2-ynh-deps [22.2.7~ynh1]
Remv wallabag2-ynh-deps [2.5.1~ynh3]
Remv php-redis [5.3.2+4.3.0-2+deb11u1]
Remv php-igbinary [3.2.1+2.0.8-2]

I tried the upgrade right after, but it fails:
https://paste.yunohost.org/raw/jajazeyaga

WARNING -  php8.0-igbinary : Breaks: php-igbinary (< 3.2.6+2.0.8-6+0~20220131.33+debian11~1.gbp1d540e~)
WARNING -  php8.0-redis : Breaks: php-redis (< 5.3.7+4.3.0-1+0~20220330.42+debian11~1.gbp6fe8b7~)

Would it be possible that jumping from Nextcloud 22 to 24 is too much of a leap?
Is there a way to select an intermediate version?
Thanks!

Wallabag is fine. No issue at first look.

That’s because the command we ran did not do anything, this was only a --dry-run to check what this would do and validate stuff to not break anything …

As shown in the log, this would remove nextcloud and wallbag virtual dependencies which is a bit uncomfortable (though not 100% critical as this doesnt remove all the dependencies per se, but an apt autoremove may uninstall them etc…)

Anyway, let’s try another solution :

sudo apt install php7.4-igbinary php7.4-redis php8.0-igbinary php8.0-redis php-igbinary- php-redis- --dry-run

(again, this is a --dry-run to validate that this doesnt remove important stuff)

Thanks @Aleks
I didn’t know what was the option --dry-run in apt. Nice to know! :wink:

Here is the output:

The following packages will be REMOVED:
  php-igbinary php-redis
The following NEW packages will be installed:
  php7.4-igbinary php7.4-redis php8.0-igbinary php8.0-redis
0 upgraded, 4 newly installed, 2 to remove and 0 not upgraded.
Remv php-redis [5.3.2+4.3.0-2+deb11u1] [wallabag2-ynh-deps:amd64 nextcloud--2-ynh-deps:amd64 ]
Inst php7.4-redis (5.3.7+4.3.0-1+0~20220330.42+debian11~1.gbp6fe8b7 bullseye [amd64])
Remv php-igbinary [3.2.1+2.0.8-2] [nextcloud--2-ynh-deps:amd64 ]
Inst php7.4-igbinary (3.2.6+2.0.8-6+0~20220131.33+debian11~1.gbp1d540e bullseye [amd64])
Inst php8.0-igbinary (3.2.6+2.0.8-6+0~20220131.33+debian11~1.gbp1d540e bullseye [amd64])
Inst php8.0-redis (5.3.7+4.3.0-1+0~20220330.42+debian11~1.gbp6fe8b7 bullseye [amd64])
Conf php7.4-redis (5.3.7+4.3.0-1+0~20220330.42+debian11~1.gbp6fe8b7 bullseye [amd64])
Conf php7.4-igbinary (3.2.6+2.0.8-6+0~20220131.33+debian11~1.gbp1d540e bullseye [amd64])
Conf php8.0-igbinary (3.2.6+2.0.8-6+0~20220131.33+debian11~1.gbp1d540e bullseye [amd64])
Conf php8.0-redis (5.3.7+4.3.0-1+0~20220330.42+debian11~1.gbp6fe8b7 bullseye [amd64])

It looks like this operation is not impacting directly the dependencies of nextcloud or wallabag.
However, they are marked in the -ynh-deps…
What do you think with all your experience. Should I try without the --dry-run?

Yes that sounds like the expected behavior, so let’s run without the --dry-run:

sudo apt install php7.4-igbinary php7.4-redis php8.0-igbinary php8.0-redis php-igbinary- php-redis-

and also:

sudo apt-mark auto php7.4-igbinary php7.4-redis php8.0-igbinary php8.0-redis
1 Like

Here is the output of the first command.

dpkg: php-redis: dependency problems, but removing anyway as you requested:
 wallabag2-ynh-deps depends on php7.4-redis; however:
  Package php7.4-redis is not installed.
  Package php-redis which provides php7.4-redis is to be removed.
 nextcloud--2-ynh-deps depends on php7.4-redis; however:
  Package php7.4-redis is not installed.
  Package php-redis which provides php7.4-redis is to be removed.

(Reading database ... 67421 files and directories currently installed.)
Removing php-redis (5.3.2+4.3.0-2+deb11u1) ...
Selecting previously unselected package php7.4-redis.
(Reading database ... 67418 files and directories currently installed.)
Preparing to unpack .../php7.4-redis_5.3.7+4.3.0-1+0~20220330.42+debian11~1.gbp6fe8b7_amd64.deb ...
Unpacking php7.4-redis (5.3.7+4.3.0-1+0~20220330.42+debian11~1.gbp6fe8b7) ...
dpkg: php-igbinary: dependency problems, but removing anyway as you requested:
 php7.4-redis depends on php7.4-igbinary; however:
  Package php7.4-igbinary is not installed.
  Package php-igbinary which provides php7.4-igbinary is to be removed.
 nextcloud--2-ynh-deps depends on php7.4-igbinary; however:
  Package php7.4-igbinary is not installed.
  Package php-igbinary which provides php7.4-igbinary is to be removed.

(Reading database ... 67421 files and directories currently installed.)
Removing php-igbinary (3.2.1+2.0.8-2) ...
Selecting previously unselected package php7.4-igbinary.
(Reading database ... 67411 files and directories currently installed.)
Preparing to unpack .../php7.4-igbinary_3.2.6+2.0.8-6+0~20220131.33+debian11~1.gbp1d540e_amd64.deb ...
Unpacking php7.4-igbinary (3.2.6+2.0.8-6+0~20220131.33+debian11~1.gbp1d540e) ...
Selecting previously unselected package php8.0-igbinary.
Preparing to unpack .../php8.0-igbinary_3.2.6+2.0.8-6+0~20220131.33+debian11~1.gbp1d540e_amd64.deb ...
Unpacking php8.0-igbinary (3.2.6+2.0.8-6+0~20220131.33+debian11~1.gbp1d540e) ...
Selecting previously unselected package php8.0-redis.
Preparing to unpack .../php8.0-redis_5.3.7+4.3.0-1+0~20220330.42+debian11~1.gbp6fe8b7_amd64.deb ...
Unpacking php8.0-redis (5.3.7+4.3.0-1+0~20220330.42+debian11~1.gbp6fe8b7) ...
Setting up php7.4-igbinary (3.2.6+2.0.8-6+0~20220131.33+debian11~1.gbp1d540e) ...
Setting up php8.0-igbinary (3.2.6+2.0.8-6+0~20220131.33+debian11~1.gbp1d540e) ...
Setting up php7.4-redis (5.3.7+4.3.0-1+0~20220330.42+debian11~1.gbp6fe8b7) ...
Setting up php8.0-redis (5.3.7+4.3.0-1+0~20220330.42+debian11~1.gbp6fe8b7) ...
Processing triggers for php7.4-fpm (1:7.4.32-1+0~20220929.71+debian11~1.gbpe9c007) ...
Processing triggers for php7.4-cli (1:7.4.32-1+0~20220929.71+debian11~1.gbpe9c007) ...
Processing triggers for php8.0-fpm (1:8.0.24-1+0~20220929.42+debian11~1.gbp2c640a) ...
Processing triggers for php8.0-cli (1:8.0.24-1+0~20220929.42+debian11~1.gbp2c640a) ...

It seems to say he is not happy with dependency disappearing, but it got it done anyway. It did not remove wallabag or nextcloud virtual dependencies.

Then I triggered the upgrade of the nextcloud package and it went through after multiple apps updates.
Thank you so much, I learned your way of dealing with apt --dry-run attempts. :wink:

1 Like

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