Install specific version of Composer at Uberspace

When I just tried to update a Wallabag installation at, I got the following error message.

Your lock file does not contain a compatible set of packages. Please run composer update.

  Problem 1
    - Root composer.json requires composer < 2.3, found composer[2.3.10] but it does not match the constraint.

The recommendation to run composer update does not help in this case. The problem is that Uberspace has version 2.3.10 of Composer installed. Wallabag, however, currently requires Composer in a version < 2.3. So far I had with Uberspace actually only cases where certain packages were too stable (one could also say too old).

So, at least temporarily, a workaround is necessary. On the Uberspace in question, I ran the following commands.

wget -qO composer-setup.php
php composer-setup.php --install-dir=/home/$USER/bin --filename=composer --version=2.2.17

The first command downloads the installer of Composer. The second one downloads version 2.2.17 of Composer and saves it in the ~/bin directory with the filename composer.

I was then able to update Wallabag without any problems. Since ~/bin is part of $PATH and Composer is not necessary for using Wallabag, I renamed the file to composer.old to avoid problems with other installed software that needs a newer version.

OSBN | Linux

These articles could also be interesting:
I reserve the right not to activate comments. The activation of comments can also take several days.