YunoHost-Apps / wallabag2_ynh

Wallabag v2 package for YunoHost
https://www.wallabag.org/
GNU Affero General Public License v3.0
62 stars 14 forks source link

Cannot update to 2.4.3 : php dependencies issue #141

Closed tio-trom closed 2 years ago

tio-trom commented 2 years ago

This is the log - https://paste.yunohost.org/raw/atifuceraj

I mainly see this 2022-07-24 15:26:07,815: WARNING - E: Packages need to be removed but remove is disabled.

mdic commented 2 years ago

Can't update here either, but the problem seems to be more complex. Full log is here

mrtpcet commented 2 years ago

Me neither : https://paste.yunohost.org/raw/dawisuxera

lapineige commented 2 years ago

Can you all tell us what Debian version you are using please ?

It is strange that some of you (@tio-trom @mrtpcet) have php 7.4 dependencies issues…

@mdic indeed you have a different error, that I think I saw already in the past… but I can't remember. Could you open a different issue please ?

lapineige commented 2 years ago

So we have two similar (but not identical ?) php dependency issues:

apt-get --assume-yes --quiet -o=Acquire::Retries=3 -o=Dpkg::Use-Pty=0 --no-remove --option Dpkg::Options::=--force-confdef --option Dpkg::Options::=--force-confold install php7.4-cli php7.4-mysql php7.4-json php7.4-gd php7.4-tidy php7.4-curl php7.4-gettext php7.4-redis php7.4-xml php7.4 php7.4-fpm php7.4-common --dry-run
WARNING - The following packages have unmet dependencies:
WARNING -  php7.4-cli : Depends: php7.4-opcache but it is not going to be installed
WARNING -               Depends: php7.4-readline but it is not going to be installed
WARNING -               Depends: libpcre2-8-0 (>= 10.38) but 10.32-5 is to be installed
WARNING -  php7.4-fpm : Depends: php7.4-opcache but it is not going to be installed
WARNING -               Depends: libpcre2-8-0 (>= 10.38) but 10.32-5 is to be installed
WARNING -  php7.4-redis : Depends: php7.4-igbinary but it is not going to be installed
WARNING -                 Breaks: php-redis (< 5.3.7+4.3.0-1+0~20220330.42+debian10~1.gbp6fe8b7~)
apt-get --assume-yes --quiet -o=Acquire::Retries=3 -o=Dpkg::Use-Pty=0 --no-remove --option Dpkg::Options::=--force-confdef --option Dpkg::Options::=--force-confold install php7.4-cli php7.4-mysql php7.4-json php7.4-gd php7.4-tidy php7.4-curl php7.4-gettext php7.4-redis php7.4-xml php7.4 php7.4-fpm php7.4-common --dry-run
WARNING - The following packages have unmet dependencies:
WARNING -  php7.4-cli : Depends: php7.4-opcache but it is not going to be installed
WARNING -               Depends: php7.4-readline but it is not going to be installed
WARNING -  php7.4-fpm : Depends: php7.4-opcache but it is not going to be installed
WARNING -  php7.4-redis : Depends: php7.4-igbinary but it is not going to be installed
WARNING -                 Breaks: php-redis (< 5.3.7+4.3.0-1+0~20220330.42+debian10~1.gbp6fe8b7~
mrtpcet commented 2 years ago

Can you all tell us what Debian version you are using please ?

Debian 10 Buster

tio-trom commented 2 years ago

Can you all tell us what Debian version you are using please ?

Debian Linux 10.12

cichy1173 commented 2 years ago

Hi. I have the same problem: https://paste.yunohost.org/raw/aqesonuyux

I use Debian 10 x86_64

lapineige commented 2 years ago

@cichy1173

The following packages will be REMOVED nextcloud-ynh-deps php-igbinary php-redis

Wow did that removed/broke your Nextcloud installation ? :astonished:

lapineige commented 2 years ago

Just to make sure: for all of you, was your Wallabag correctly restored after the failed upgrade ?

cichy1173 commented 2 years ago

@cichy1173

The following packages will be REMOVED nextcloud-ynh-deps php-igbinary php-redis

Wow did that removed/broke your Nextcloud installation ? astonished

Yes, everything is OK. I think logs copied some of the things from previous update, when I updated nextcloud.

Just to make sure: for all of you, was your Wallabag correctly restored after the failed upgrade ?

Yes, It is restored.

mrtpcet commented 2 years ago

Yes, it was correctly restored too

tio-trom commented 2 years ago

Seems to work fine here after the restore.

lapineige commented 2 years ago

Linked issue in the forum https://forum.yunohost.org/t/wallbag-wont-upgrade/20496

lapineige commented 2 years ago

Php7.4-redis issue might be specific to the presence of Nextcloud app (and other apps ?) and its php-redis dependency conflicting with php7.4-redis that we try to install. See https://forum.yunohost.org/t/mise-a-jour-impossible-de-wallabag/20485/6

We will need to figure out if we can avoid that… ping @YunoHost-Apps/apps-group :pray:

lapineige commented 2 years ago

One step forward : from that comment https://github.com/YunoHost-Apps/pixelfed_ynh/issues/165#issuecomment-1165852678, I understand that php7.4-redis is not compatible with php7.3-redis. It might be the case that Nextcloud is using php7.3-redis, hence this blocks the upgrade.

I don't know how to solves this, except if we have an upgrade of Nextcloud that makes use of php7.4 instead ?

I wonder how this will deal with php8.0, that will be introduced in Nextcloud 8.0 https://github.com/YunoHost-Apps/nextcloud_ynh/pull/493. However we will have to upgrade to php8.0 at some point, so I hope it will go fine…

El-Gavy commented 2 years ago

Hi,

Don't know if that can be useful be here is mine: https://paste.yunohost.org/raw/vagoqonuxo (not even sure if this is indeed the same issue…)

lapineige commented 2 years ago

Changing php version will not resolve this issue : https://github.com/YunoHost-Apps/pixelfed_ynh/issues/165#issuecomment-1195789918

lapineige commented 2 years ago

@El-Gavy your issue is different, it's this one #143. Can you copy your comment there please ?

lapineige commented 2 years ago

Could you all try this branch ? yunohost app upgrade wallabag2 -u https://github.com/YunoHost-Apps/wallabag2_ynh/tree/testing

It will upgrade to Wallabag 2.5 and hopefully fix some of your issues.

cichy1173 commented 2 years ago

Could you all try this branch ? yunohost app upgrade wallabag2 -u https://github.com/YunoHost-Apps/wallabag2_ynh/tree/testing

It will upgrade to Wallabag 2.5 and hopefully fix some of your issues.

It does not work. https://paste.yunohost.org/raw/rohaqehoyo

tetchey commented 2 years ago

yunohost app upgrade wallabag2 -u https://github.com/YunoHost-Apps/wallabag2_ynh/tree/testing

Unfortunately, this is still failing for me also. https://paste.yunohost.org/raw/dilemofote

tio-trom commented 2 years ago

Upgrade to 2.5.0~ynh2 also fails. Log here https://paste.yunohost.org/raw/ehiwabelub

mrtpcet commented 2 years ago

Upgrade to 2.5.0~ynh2 also fails too. Log here : https://paste.yunohost.org/raw/erapebeyax

Thanks a lot for trying to solve the problem !! May the force be with you

lapineige commented 2 years ago

For the record I'm extracting error messages again:

apt-get --assume-yes --quiet -o=Acquire::Retries=3 -o=Dpkg::Use-Pty=0 --no-remove --option Dpkg::Options::=--force-confdef --option Dpkg::Options::=--force-confold install php7.4-cli php7.4-mysql php7.4-json php7.4-gd php7.4-tidy php7.4-curl php7.4-gettext php7.4-redis php7.4-xml php7.4-mbstring php7.4-ldap php7.4-intl php7.4 php7.4-fpm php7.4-common --dry-run
The following packages have unmet dependencies:
php7.4-cli : Depends: php7.4-opcache but it is not going to be installed
              Depends: php7.4-readline but it is not going to be installed
php7.4-fpm : Depends: php7.4-opcache but it is not going to be installed
php7.4-redis : Depends: php7.4-igbinary but it is not going to be installed
               Breaks: php-redis (< 5.3.7+4.3.0-1+0~20220330.42+debian10~1.gbp6fe8b7~)

So the situation remains the same…

lapineige commented 2 years ago

Could you try this branch ? ~yunohost app upgrade wallabag2 -u https://github.com/YunoHost-Apps/wallabag2_ynh/tree/fix-php-dep~ Edit: merged to testing #147 so now use : yunohost app upgrade wallabag2 -u https://github.com/YunoHost-Apps/wallabag2_ynh/tree/testing

It won't work, but it will enable us to understand if one of the dependencies (php-redis) issues is solved.

tetchey commented 2 years ago

@lapineige Thank you, this seems to have worked!

% sudo yunohost app upgrade wallabag2 -u https://github.com/YunoHost-Apps/wallabag2_ynh/tree/fix-php-dep
Info: Now upgrading wallabag2...
Info: [....................] > Loading installation settings...
Info: [....................] > Checking version...
Info: [++++++++++..........] > Backing up the app before upgrading (may take a while)...
Info: [##########..........] > Ensuring downward compatibility...
Info: [##########+.........] > Making sure dedicated system user exists...
Info: [###########++.......] > Upgrading source files...
Info: [#############.......] > Upgrading NGINX web server configuration...
Info: [#############++.....] > Upgrading dependencies...
Info: [###############.....] > Upgrading PHP-FPM configuration...
Info: The service fail2ban has correctly executed the action reload-or-restart.
Info: [###############++++.] > Reconfiguring wallabag...
Info: [###################.] > Reloading NGINX web server...
Info: [####################] > Upgrade of wallabag2 completed
Success! wallabag2 upgraded
Success! Upgrade complete
mrtpcet commented 2 years ago

It's seems to have worked too !

yunohost app upgrade wallabag2 -u https://github.com/YunoHost-Apps/wallabag2_ynh/tree/fix-php-dep
Info: Now upgrading wallabag2...
Info: [....................] > Loading installation settings...
Info: [....................] > Checking version...
Info: [++++++++++..........] > Backing up the app before upgrading (may take a while)...
Info: [##########..........] > Ensuring downward compatibility...
Info: [##########+.........] > Making sure dedicated system user exists...
Info: [###########++.......] > Upgrading source files...
Info: [#############.......] > Upgrading NGINX web server configuration...
Info: [#############++.....] > Upgrading dependencies...
Info: [###############.....] > Upgrading PHP-FPM configuration...
Info: The service fail2ban has correctly executed the action reload-or-restart.
Info: [###############++++.] > Reconfiguring wallabag...
Info: [###################.] > Reloading NGINX web server...
Info: [####################] > Upgrade of wallabag2 completed
Success! wallabag2 upgraded
Success! Upgrade complete
tio-trom commented 2 years ago

yunohost app upgrade wallabag2 -u https://github.com/YunoHost-Apps/wallabag2_ynh/tree/testing

Fails for me. Here is the log -

admin@server:~$ sudo yunohost app upgrade wallabag2 -u https://github.com/YunoHost-Apps/wallabag2_ynh/tree/testing
Info: Now upgrading wallabag2...
Info: [....................] > Loading installation settings...
Info: [....................] > Checking version...
Info: [++++++++++..........] > Backing up the app before upgrading (may take a while)...
Info: [##########..........] > Ensuring downward compatibility...
Info: [##########+.........] > Making sure dedicated system user exists...
Info: [###########++.......] > Upgrading source files...
Info: [#############.......] > Upgrading NGINX web server configuration...
Info: [#############++.....] > Upgrading dependencies...
Warning: E: Could not get lock /var/lib/apt/lists/lock - open (11: Resource temporarily unavailable)
Warning: E: Unable to lock directory /var/lib/apt/lists/
Warning: [Error] Upgrade failed.
Warning: The app was restored to the way it was before the failed upgrade.
Error: Could not upgrade wallabag2: An error occurred inside the app upgrade script
Info: The operation 'Upgrade the 'wallabag2' app' could not be completed. Please share the full log of this operation using the command 'yunohost log share 20220801-122547-app_upgrade-wallabag2' to get help
Warning: Here's an extract of the logs before the crash. It might help debugging the error:
Info: DEBUG - + append=0
Info: DEBUG - + append=tee
Info: DEBUG - + [[ extra_php_version != \e\x\t\r\a\_\p\h\p\_\v\e\r\s\i\o\n ]]
Info: DEBUG - + return 0
Info: DEBUG - + '[' -n https://packages.sury.org/php/apt.gpg ']'
Info: DEBUG - + mkdir --parents /etc/apt/trusted.gpg.d
Info: DEBUG - + wget --timeout 900 --quiet https://packages.sury.org/php/apt.gpg --output-document=-
Info: DEBUG - + gpg --dearmor
Info: DEBUG - + tee /etc/apt/trusted.gpg.d/extra_php_version.gpg
Info: DEBUG - + ynh_package_update
Info: DEBUG - + ynh_apt update
Info: DEBUG - + ynh_wait_dpkg_free
Info: DEBUG - + return 0
Info: DEBUG - + LC_ALL=C
Info: DEBUG - + DEBIAN_FRONTEND=noninteractive
Info: DEBUG - + apt-get --assume-yes --quiet -o=Acquire::Retries=3 -o=Dpkg::Use-Pty=0 update
Info: DEBUG - Reading package lists...
Info: WARNING - E: Could not get lock /var/lib/apt/lists/lock - open (11: Resource temporarily unavailable)
Info: WARNING - E: Unable to lock directory /var/lib/apt/lists/
Info: DEBUG - + ynh_exit_properly
Error: The operation 'Upgrade the 'wallabag2' app' could not be completed. Please share the full log of this operation using the command 'yunohost log share 20220801-122547-app_upgrade-wallabag2' to get help
gokceozan commented 2 years ago

Fails for me too. Here is the log: https://paste.yunohost.org/raw/afefahukuy

yalh76 commented 2 years ago

yunohost app upgrade wallabag2 -u https://github.com/YunoHost-Apps/wallabag2_ynh/tree/testing

Fails for me. Here is the log -

admin@server:~$ sudo yunohost app upgrade wallabag2 -u https://github.com/YunoHost-Apps/wallabag2_ynh/tree/testing
Info: Now upgrading wallabag2...
Info: [....................] > Loading installation settings...
Info: [....................] > Checking version...
Info: [++++++++++..........] > Backing up the app before upgrading (may take a while)...
Info: [##########..........] > Ensuring downward compatibility...
Info: [##########+.........] > Making sure dedicated system user exists...
Info: [###########++.......] > Upgrading source files...
Info: [#############.......] > Upgrading NGINX web server configuration...
Info: [#############++.....] > Upgrading dependencies...
Warning: E: Could not get lock /var/lib/apt/lists/lock - open (11: Resource temporarily unavailable)
Warning: E: Unable to lock directory /var/lib/apt/lists/
Warning: [Error] Upgrade failed.
Warning: The app was restored to the way it was before the failed upgrade.
Error: Could not upgrade wallabag2: An error occurred inside the app upgrade script
Info: The operation 'Upgrade the 'wallabag2' app' could not be completed. Please share the full log of this operation using the command 'yunohost log share 20220801-122547-app_upgrade-wallabag2' to get help
Warning: Here's an extract of the logs before the crash. It might help debugging the error:
Info: DEBUG - + append=0
Info: DEBUG - + append=tee
Info: DEBUG - + [[ extra_php_version != \e\x\t\r\a\_\p\h\p\_\v\e\r\s\i\o\n ]]
Info: DEBUG - + return 0
Info: DEBUG - + '[' -n https://packages.sury.org/php/apt.gpg ']'
Info: DEBUG - + mkdir --parents /etc/apt/trusted.gpg.d
Info: DEBUG - + wget --timeout 900 --quiet https://packages.sury.org/php/apt.gpg --output-document=-
Info: DEBUG - + gpg --dearmor
Info: DEBUG - + tee /etc/apt/trusted.gpg.d/extra_php_version.gpg
Info: DEBUG - + ynh_package_update
Info: DEBUG - + ynh_apt update
Info: DEBUG - + ynh_wait_dpkg_free
Info: DEBUG - + return 0
Info: DEBUG - + LC_ALL=C
Info: DEBUG - + DEBIAN_FRONTEND=noninteractive
Info: DEBUG - + apt-get --assume-yes --quiet -o=Acquire::Retries=3 -o=Dpkg::Use-Pty=0 update
Info: DEBUG - Reading package lists...
Info: WARNING - E: Could not get lock /var/lib/apt/lists/lock - open (11: Resource temporarily unavailable)
Info: WARNING - E: Unable to lock directory /var/lib/apt/lists/
Info: DEBUG - + ynh_exit_properly
Error: The operation 'Upgrade the 'wallabag2' app' could not be completed. Please share the full log of this operation using the command 'yunohost log share 20220801-122547-app_upgrade-wallabag2' to get help

Could not get lock /var/lib/apt/lists/lock - open (11: Resource temporarily unavailable) You would have the same error just doing apt update or apt upgrade, there is already an ongoing upgrade of debian packages

yalh76 commented 2 years ago

Fails for me too. Here is the log: https://paste.yunohost.org/raw/afefahukuy

WARNING - 807 A backup archive with this name already exists.

you should look in /home/yunohost.backup/archives

tio-trom commented 2 years ago

Could not get lock /var/lib/apt/lists/lock - open (11: Resource temporarily unavailable) You would have the same error just doing apt update or apt upgrade, there is already an ongoing upgrade of debian packages

True and weird since I was not doing any updates. I tried again and I see similar errors with the original ones - https://paste.yunohost.org/raw/sikifuheja

gokceozan commented 2 years ago

Fails for me too. Here is the log: https://paste.yunohost.org/raw/afefahukuy

WARNING - 807 A backup archive with this name already exists.

you should look in /home/yunohost.backup/archives

Oh, yes, that did the trick! Thank you.

But after a successful update, the issue remains:

Composer detected issues in your platform:
Your Composer dependencies require a PHP version ">= 7.4.1". You are running 7.3.33-4+0~20220627.98+debian10~1.gbp40b3e4.
PHP Fatal error:  Composer detected issues in your platform: Your Composer dependencies require a PHP version ">= 7.4.1". You are running 7.3.33-4+0~20220627.98+debian10~1.gbp40b3e4. in /var/www/wallabag2/vendor/composer/platform_check.php
on line 24
Pfeil commented 2 years ago

But after a successful update, the issue remains:

Composer detected issues in your platform:
Your Composer dependencies require a PHP version ">= 7.4.1". You are running 7.3.33-4+0~20220627.98+debian10~1.gbp40b3e4.
PHP Fatal error:  Composer detected issues in your platform: Your Composer dependencies require a PHP version ">= 7.4.1". You are running 7.3.33-4+0~20220627.98+debian10~1.gbp40b3e4. in /var/www/wallabag2/vendor/composer/platform_check.php
on line 24

Where do you see this, is it in the installation logs or something? Does wallabag still work anyway?

Do others experience issues?