Giter Site home page Giter Site logo

Comments (52)

aarontrom avatar aarontrom commented on July 3, 2024 2

Hi @sthaydn yes, actually just yesterday I worked on that and I did the following 3 things:

apt install php7.4-igbinary
apt install php7.4-redis
apt install php7.4-imagick

after installing these packages I was able to upgrade Pixelfed from 0.11.1 to 0.11.2 :)

from pixelfed_ynh.

lapineige avatar lapineige commented on July 3, 2024 1

Thanks for sharing the workaround. Nice to see this worked :)

from pixelfed_ynh.

aarontrom avatar aarontrom commented on July 3, 2024 1

So I have to share here that my nextcloud Instance has some issues and I strongly suspect this is due to the change that I did there:

Hi @sthaydn yes, actually just yesterday I worked on that and I did the following 3 things:

apt install php7.4-igbinary
apt install php7.4-redis
apt install php7.4-imagick

after installing these packages I was able to upgrade Pixelfed from 0.11.1 to 0.11.2 :)

I am now investigating.

from pixelfed_ynh.

aarontrom avatar aarontrom commented on July 3, 2024 1

I restored a Nextcloud-Backup (from 4 days ago) after I removed the 3 packages that I installed there and now it works again. And interestingly Pixelfed works too, despite me removing

apt install php7.4-igbinary
apt install php7.4-redis
apt install php7.4-imagick

from pixelfed_ynh.

yalh76 avatar yalh76 commented on July 3, 2024 1

With php 8.0… maybe it with resolve the conflict ?

Same issue with php8.0-redis

From https://packages.sury.org/php/dists/buster/main/binary-amd64/Packages

Package: php8.0-redis
Source: php-redis
Version: 5.3.7+4.3.0-1+0~20220330.42+debian10~1.gbp6fe8b7
Architecture: amd64
Maintainer: Debian PHP PECL Maintainers <[email protected]>
Installed-Size: 673
Pre-Depends: php-common (>= 2:69~)
Depends: php8.0-common, php8.0-igbinary, phpapi-20200930, libc6 (>= 2.14), liblz4-1 (>= 0.0~r130), libzstd1 (>= 1.3.2)
Suggests: redis-server
Breaks: php-redis (<< 5.3.7+4.3.0-1+0~20220330.42+debian10~1.gbp6fe8b7~)

Maybe a solution would be to just have php-redis instead of php${YNH_PHP_VERSION}-redis

from pixelfed_ynh.

Tony-John-Cil avatar Tony-John-Cil commented on July 3, 2024 1

Thanks ! But it seems that there's a problem with php-imagick too.
Here's my log after a sudo yunohost app upgrade pixelfed -u https://github.com/YunoHost-Apps/pixelfed_ynh/tree/testing --debug : https://paste.yunohost.org/raw/umugonicip

from pixelfed_ynh.

Tony-John-Cil avatar Tony-John-Cil commented on July 3, 2024 1

In this case, there aren't many steps I can add. Here is the very specific procedure I've done but other configurations may act differently :

cd /var/www/pixelfed
sudo rm composer.phar
# Composer installation steps as they are prompted on https://getcomposer.org/download/ 
sudo php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
sudo php -r "if (hash_file('sha384', 'composer-setup.php') === '55ce33d7678c5a611085589f1f3ddf8b3c52d662cd01d4ba75c0ee0459970c2200a51f492d557530c71c15d8dba01eae') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"
sudo php composer-setup.php
sudo php -r "unlink('composer-setup.php');"
## Upgrade from Yunohost testing branch
sudo yunohost app upgrade pixelfed -u https://github.com/YunoHost-Apps/pixelfed_ynh/tree/testing --debug

But isn't there a way to check for the version of composer.phar through the YunoHost upgrade script, and replace it with its more up-to-date version during the update ? It would prevent similar problems in the future and avoid this kind of manipulation that could lead to errors, even if its simple to do for advanced users. (back in the days, I've already had a kernel panic after installing a screensaver on my personal Ubuntu computer through command lines ; so simpler is the solution, better it is for all users).

from pixelfed_ynh.

aarontrom avatar aarontrom commented on July 3, 2024

I think the reason why it failed is because I'm still using php 7.3 and not 7.4 right?
But that's related to yunohost running on Debian 10.
This will probably be solved with the upgrade to Debian 11, am I right?

from pixelfed_ynh.

lapineige avatar lapineige commented on July 3, 2024

Even on Debian 10, the upgrade should install php7.4 (if needed) and run Pixelfed with it (it was php7.3 before that version).

I will take a look at your logs.

from pixelfed_ynh.

lapineige avatar lapineige commented on July 3, 2024

Here is the error:

The following additional packages will be installed:
2022-02-06 12:37:19,945: DEBUG - php7.4 php7.4-bcmath php7.4-cli php7.4-common php7.4-curl php7.4-fpm
2022-02-06 12:37:19,945: DEBUG - php7.4-gd php7.4-igbinary php7.4-imagick php7.4-intl php7.4-json
2022-02-06 12:37:19,945: DEBUG - php7.4-mbstring php7.4-opcache php7.4-pgsql php7.4-readline php7.4-redis
2022-02-06 12:37:19,946: DEBUG - php7.4-xml php7.4-zip
2022-02-06 12:37:20,011: DEBUG - The following packages will be REMOVED:
2022-02-06 12:37:20,015: DEBUG - friendica-ynh-deps nextcloud-ynh-deps php-igbinary php-imagick php-redis
2022-02-06 12:37:20,017: DEBUG - The following NEW packages will be installed:
2022-02-06 12:37:20,018: DEBUG - php7.4 php7.4-bcmath php7.4-cli php7.4-common php7.4-curl php7.4-fpm
2022-02-06 12:37:20,018: DEBUG - php7.4-gd php7.4-igbinary php7.4-imagick php7.4-intl php7.4-json
2022-02-06 12:37:20,018: DEBUG - php7.4-mbstring php7.4-opcache php7.4-pgsql php7.4-readline php7.4-redis
2022-02-06 12:37:20,019: DEBUG - php7.4-xml php7.4-zip
2022-02-06 12:37:20,044: DEBUG - 0 upgraded, 18 newly installed, 5 to remove and 0 not upgraded.
2022-02-06 12:37:20,044: WARNING - E: Packages need to be removed but remove is disabled.
2022-02-06 12:37:20,047: DEBUG - ++ cat /tmp/tmp.YSe3IRtLUQ/dpkg_log
2022-02-06 12:37:20,047: DEBUG - ++ grep -oP '(?<=-ynh-deps depends on ).*(?=; however)'
2022-02-06 12:37:20,048: DEBUG - ++ tr '\n' ' '
2022-02-06 12:37:20,052: DEBUG - + local 'problematic_dependencies=php7.4-bcmath php7.4-cli php7.4-ctype php7.4-curl php7.4-exif php7.4-gd php7.4-iconv php7.4-intl php7.4-json php7.4-mbstring php7.4-redis php7.4-tokenizer php7.4-xml php7.4-zip php7.4-pdo php7.4-pgsql php7.4-fileinfo php7.4-imagick php7.4 php7.4-fpm php7.4-common '
2022-02-06 12:37:20,052: DEBUG - + [[ -n php7.4-bcmath php7.4-cli php7.4-ctype php7.4-curl php7.4-exif php7.4-gd php7.4-iconv php7.4-intl php7.4-json php7.4-mbstring php7.4-redis php7.4-tokenizer php7.4-xml php7.4-zip php7.4-pdo php7.4-pgsql php7.4-fileinfo php7.4-imagick php7.4 php7.4-fpm php7.4-common ]]
2022-02-06 12:37:20,052: DEBUG - + ynh_package_install php7.4-bcmath php7.4-cli php7.4-ctype php7.4-curl php7.4-exif php7.4-gd php7.4-iconv php7.4-intl php7.4-json php7.4-mbstring php7.4-redis php7.4-tokenizer php7.4-xml php7.4-zip php7.4-pdo php7.4-pgsql php7.4-fileinfo php7.4-imagick php7.4 php7.4-fpm php7.4-common --dry-run
2022-02-06 12:37:20,052: DEBUG - + ynh_apt --no-remove --option Dpkg::Options::=--force-confdef --option Dpkg::Options::=--force-confold install php7.4-bcmath php7.4-cli php7.4-ctype php7.4-curl php7.4-exif php7.4-gd php7.4-iconv php7.4-intl php7.4-json php7.4-mbstring php7.4-redis php7.4-tokenizer php7.4-xml php7.4-zip php7.4-pdo php7.4-pgsql php7.4-fileinfo php7.4-imagick php7.4 php7.4-fpm php7.4-common --dry-run
2022-02-06 12:37:20,053: DEBUG - + ynh_wait_dpkg_free
2022-02-06 12:37:20,053: DEBUG - + grep -v 'fix-broken|Reading state info'
2022-02-06 12:37:20,053: DEBUG - + sed --quiet '/Reading state info/,$p'
2022-02-06 12:37:20,535: DEBUG - + return 0
2022-02-06 12:37:20,536: DEBUG - + LC_ALL=C
2022-02-06 12:37:20,536: DEBUG - + DEBIAN_FRONTEND=noninteractive
2022-02-06 12:37:20,536: DEBUG - + 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-bcmath php7.4-cli php7.4-ctype php7.4-curl php7.4-exif php7.4-gd php7.4-iconv php7.4-intl php7.4-json php7.4-mbstring php7.4-redis php7.4-tokenizer php7.4-xml php7.4-zip php7.4-pdo php7.4-pgsql php7.4-fileinfo php7.4-imagick php7.4 php7.4-fpm php7.4-common --dry-run
2022-02-06 12:37:21,333: WARNING - The following packages have unmet dependencies:
2022-02-06 12:37:21,334: WARNING - php7.4-cli : Depends: php7.4-opcache but it is not going to be installed
2022-02-06 12:37:21,334: WARNING - Depends: php7.4-readline but it is not going to be installed
2022-02-06 12:37:21,335: WARNING - php7.4-fpm : Depends: php7.4-opcache but it is not going to be installed
2022-02-06 12:37:21,335: WARNING - php7.4-imagick : Breaks: php-imagick (< 3.6.0-4+020220117.35+debian101.gbp149f82~)
2022-02-06 12:37:21,335: WARNING - php7.4-redis : Depends: php7.4-igbinary but it is not going to be installed
2022-02-06 12:37:21,336: WARNING - Breaks: php-redis (< 5.3.5+4.3.0-5+020220131.41+debian101.gbpf8a972~)
2022-02-06 12:37:21,337: DEBUG - + ynh_die '--message=Unable to install dependencies'

I don't know what's the issue that prevent those dependencies from being installed. Sounds like there is some conflict, such as with php-redis.
ping @YunoHost-Apps/apps-group ?


By the way, this is strange:

DEBUG - The following packages will be REMOVED:
DEBUG - friendica-ynh-deps nextcloud-ynh-deps php-igbinary php-imagick php-redis

You might check if both friendica and nextcloud are working well…

from pixelfed_ynh.

aarontrom avatar aarontrom commented on July 3, 2024

Thanks for looking into that!
Both friendica and nextcloud work well.

from pixelfed_ynh.

sthaydn avatar sthaydn commented on July 3, 2024

I have the same issue with this. I am running Pixelfed on a VPS as well.

from pixelfed_ynh.

aarontrom avatar aarontrom commented on July 3, 2024

Update:
I installed php 7.4 via this tutorial and tried to update Pixelfed again, but the following happened: https://paste.yunohost.org/raw/numayagiwu

from pixelfed_ynh.

lapineige avatar lapineige commented on July 3, 2024

So the same error I guess ?

If you install the previous version (I suppose you will have to use yunohost app install https://github.com/YunoHost-Apps/pixelfed_ynh/tree/4c1cc4281c6069842ff5ce12de6dce4000211a3e, and then update it, does it work ?

from pixelfed_ynh.

aarontrom avatar aarontrom commented on July 3, 2024

I logged in my server, went to /var/www/pixelfed and got this after I used your command:

/var/www/pixelfed# yunohost app install -u https://github.com/YunoHost-Apps/pixelfed_ynh/tree/4c1cc4281c6069842ff5ce12de6dce4000211a3e
usage: yunohost {app} ...
                [-h] [--output-as {json,plain,none}] [--debug] [--quiet]
                [--timeout ==SUPPRESS==] [-v]
yunohost: error: unrecognized arguments: -u

from pixelfed_ynh.

lapineige avatar lapineige commented on July 3, 2024

Oh sorry, you don't need that -u parameter (that's used for manual upgrade). I changed the command.

By the way, you don't need to be in /var/www/pixelfed, current directory doesn't matter.

from pixelfed_ynh.

aarontrom avatar aarontrom commented on July 3, 2024

Ahh okay thx, but how do I do that, because I cannot install it on the same domain:
Error: Sorry, this app must be installed on a domain of its own, but other apps are already installed on the domain 'mysubdomain.mydomain.tld'. You could use a subdomain dedicated to this app instead.

So does that mean I need to delete my Pixelfed installation and then install the previous version with that command yunohost app install https://github.com/YunoHost-Apps/pixelfed_ynh/tree/4c1cc4281c6069842ff5ce12de6dce4000211a3e and then try to update it?

But can I then restore the current data somehow?

Or should I just install Pixelfed on another domain and then upgrade it just to see if that works?

from pixelfed_ynh.

aarontrom avatar aarontrom commented on July 3, 2024

Hm, I just tried the latter one (install pixelfed on another subdomain) and it failed. Here is the log: https://paste.yunohost.org/raw/isinavubeb

from pixelfed_ynh.

lapineige avatar lapineige commented on July 3, 2024

Wait, you mean that installation went well on your first try (with the current main version), even with the error you reported ?

Ok my bad, I didn't notice you were talking about an upgrade, and not a fresh install… sorry 😅

But now with you last experiment, we know that there is the same error upon install and upgrade…

I wonder what's wrong with php7.4 dependencies on some servers and not on others… Something about Debian specific minor versions ? 🤔
@YunoHost-Apps/apps-group do you have an idea ?

from pixelfed_ynh.

sthaydn avatar sthaydn commented on July 3, 2024

Any news about that, @aarontrom? Did you manage to get it working?

from pixelfed_ynh.

sthaydn avatar sthaydn commented on July 3, 2024

Worked also for me. Thanks a lot!

from pixelfed_ynh.

aarontrom avatar aarontrom commented on July 3, 2024

awesome 👍🏾 no problem :)

from pixelfed_ynh.

sthaydn avatar sthaydn commented on July 3, 2024

Oh dear, that's indeed very strange. But glad it works for you now. I don't have Nextcloud installed, all other apps are working fine.

from pixelfed_ynh.

aarontrom avatar aarontrom commented on July 3, 2024

Hm, now the supervisor service from Pixelfed doesn't work anymore. So there seems to be an issue with the php versions. Some depend on php7.3 and pixelfed 0.11.2 only works with php7.4

from pixelfed_ynh.

aarontrom avatar aarontrom commented on July 3, 2024

Yes I might reopen this issue for the yunohost pixelfed packagers.

from pixelfed_ynh.

lapineige avatar lapineige commented on July 3, 2024

Some depend on php7.3

What depends on php7.3 ?
We migrated recently (with last version upgrade) to php7.4, maybe there is some dead spot 😅

Yes I might reopen this issue for the yunohost pixelfed packagers.

Good point, I forgot to reopen it 😅

from pixelfed_ynh.

aarontrom avatar aarontrom commented on July 3, 2024

In /etc/php/7.3/fpm/pool.d there seem a lot of apps using and depending on php7.3:

image

I can also share this in /run/php:

image

also in sudo update-alternatives --config php php7.3 is apparently the deault:

There are 2 choices for the alternative php (providing /usr/bin/php).

  Selection    Path             Priority   Status
------------------------------------------------------------
  0            /usr/bin/php7.4   74        auto mode
* 1            /usr/bin/php7.3   73        manual mode
  2            /usr/bin/php7.4   74        manual mode

Press <enter> to keep the current choice[*], or type selection number: 

from pixelfed_ynh.

aarontrom avatar aarontrom commented on July 3, 2024

Should I choose the option 0 there? to put php7.4 in auto mode?
By the way, what is the difference there between auto mode and manual mode?

from pixelfed_ynh.

lapineige avatar lapineige commented on July 3, 2024

In /etc/php/7.3/fpm/pool.d there seem a lot of apps using and depending on php7.3:

That's fine and quite normal as far as I know. (but migrations to php7.4 are coming for some of them)

Should I choose the option 0 there? to put php7.4 in auto mode?
By the way, what is the difference there between auto mode and manual mode?

I have noooo idea 😅. Maybe @YunoHost-Apps/apps-group will have more information, but I would say change nothing and let Yunohost apps handle this php version stuff, just in case 😅

from pixelfed_ynh.

aarontrom avatar aarontrom commented on July 3, 2024

Ahh okay, thanks for that 👍🏾 😄

from pixelfed_ynh.

Tony-John-Cil avatar Tony-John-Cil commented on July 3, 2024

Are there any news on that bug ? I've got the same problem. I can't update Pixelfed to a version higher than 0.11.1 , I've got Nextcloud on my server too and I'm midly confident in installing php7.4 manually if it may break something. I've installed PHP 7.4 through a blank custom webapp, tried to set the version through sudo update-alternatives --config php (I've got 7.3 and 8.0 too), but the upgrade never works.

from pixelfed_ynh.

aarontrom avatar aarontrom commented on July 3, 2024

there was an upgrade today actually of pixelfed on yunohost via the admin panel. I did the upgrade to version: 0.11.3 and everything works fine now. I also do have a NextCloud there, plus I also do have php 7.4 and pixelfed is using that actually.

from pixelfed_ynh.

Tony-John-Cil avatar Tony-John-Cil commented on July 3, 2024

Yes, but if I've correctly followed your case :

  • the Pixelfed upgrade from 0.11.1 to 0.11.2 didn't work.
  • you've installed php7.4 packages through apt.
  • you've installed php7.4-igbinary, php7.4-redis and php7.4-imagick specifically through apt.
  • the Pixelfed upgrade from 0.11.1 to 0.11.2 did work.
  • then you had issues with Nextcloud, so you've restored a backup.
  • you've removed php7.4-igbinary, php7.4-redis and php7.4-imagick specifically through apt.
  • then you had issues with Supervisor.
  • then the Pixelfed upgrade from 0.11.2 to 0.11.3 did work.

So shall I have to take all those steps too to upgrade my Pixelfed installation, temporarily breaking my Nextcloud service and my Pixelfed service, or is it possible to implement something on the Yunohost package which may be more secure, or is there at least a more easy way to do the upgrade manually ?

from pixelfed_ynh.

aarontrom avatar aarontrom commented on July 3, 2024

Ohh @Tony-John-Cil I'm sorry that I didn't get back to your message earlier...
hm, I'm not sure entirely how you should do it best. Did you figure something out in the meantime?

from pixelfed_ynh.

Tony-John-Cil avatar Tony-John-Cil commented on July 3, 2024

Nope, I still haven't updated it successfully, but I'm now waiting for the update of the Nextcloud app, which is still in version 22, but a pull request for version 24 is pending, then I will try to update Pixelfed again with the hope that it won't break.

from pixelfed_ynh.

yalh76 avatar yalh76 commented on July 3, 2024

All thoses issues comes from the upgrade of PHP from 7.3 to 7.4. Pixelfed require php-redis but php7.3-redis is not compatible with php7.4-redis ...

from pixelfed_ynh.

lapineige avatar lapineige commented on July 3, 2024

What version does Nextcloud use ?
If it's 7.4, maybe upgrade Pixelfed to 7.4 (view Yunohost normal upgrade) first ?

from pixelfed_ynh.

Tony-John-Cil avatar Tony-John-Cil commented on July 3, 2024

nextcloud_ynh still uses Nextcloud 22 with PHP 7.3, but pull requests are pending for Nextcloud 23 and 24 which uses higher PHP versions.

from pixelfed_ynh.

lapineige avatar lapineige commented on July 3, 2024

With php 8.0… maybe it with resolve the conflict ?

from pixelfed_ynh.

lapineige avatar lapineige commented on July 3, 2024

I'll try that… but for the other dependencies, I hope it's not the same…

from pixelfed_ynh.

lapineige avatar lapineige commented on July 3, 2024

Oh wait we are using php-redishttps://github.com/YunoHost-Apps/pixelfed_ynh/blob/testing/scripts/_common.sh#L11
edit: no it's php7.4-redis, my bad ^^

@Tony-John-Cil could you try again now with the latest version ? (0.11.3)

from pixelfed_ynh.

lapineige avatar lapineige commented on July 3, 2024

Can you try again with this one ?

from pixelfed_ynh.

Tony-John-Cil avatar Tony-John-Cil commented on July 3, 2024

Thanks ! But it seems that there's still a problem with php-imagick or its dependencies. https://paste.yunohost.org/raw/befuqeneve

from pixelfed_ynh.

lapineige avatar lapineige commented on July 3, 2024

@Tony-John-Cil could you try the latest testing please ?

from pixelfed_ynh.

Tony-John-Cil avatar Tony-John-Cil commented on July 3, 2024

Thanks ! But now there's a problem with composer or one of its dependencies : /usr/share/yunohost/helpers.d/php: line 481: 9006 Killed COMPOSER_HOME="$workdir/.composer" COMPOSER_MEMORY_LIMIT=-1 php${phpversion} "$workdir/composer.phar" $commands -d "$workdir" --no-interaction --no-ansi 2>&1 https://paste.yunohost.org/raw/ajerofinol

from pixelfed_ynh.

lapineige avatar lapineige commented on July 3, 2024

The error is not really clear…
I wonder if it's not a memory limit issue 🤔

Or something about a migration to Composer 2, I recall reading something about it regarding Pixelfed.

from pixelfed_ynh.

Tony-John-Cil avatar Tony-John-Cil commented on July 3, 2024

Isn't it possible to log more errors on Yunohost scripts side or on Composer side ? Are there "verbose" options that may show more errors on that step ?

from pixelfed_ynh.

lapineige avatar lapineige commented on July 3, 2024

I don't know.

Maybe you can open a topic on the forum to ask for help ?

from pixelfed_ynh.

Tony-John-Cil avatar Tony-John-Cil commented on July 3, 2024

Problem solved ! In the end, I've just manually replaced the file /var/www/pixelfed/composer.phar with its most up-to-date version then re-run the update command on the testing branch, and 0.11.3 was installed successfully. Thanks again for managing the php7.4 update !

from pixelfed_ynh.

lapineige avatar lapineige commented on July 3, 2024

I've just manually replaced the file /var/www/pixelfed/composer.phar

Could you explain how you did that ? (to help other people stuck in this issue ;)

from pixelfed_ynh.

lapineige avatar lapineige commented on July 3, 2024

But isn't there a way to check for the version of composer.phar through the YunoHost upgrade script, and replace it with its more up-to-date version during the update ?

We will have to work on that. I believe next version will require it, although I cannot recall where I found that.

from pixelfed_ynh.

lapineige avatar lapineige commented on July 3, 2024

I believe #182 might fix the original issue @aarontrom had.
Could you test it if you are concerned ?

I'm closing for now.

from pixelfed_ynh.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.