Fryboyter

Install specific version of Composer at Uberspace

When I just tried to update a Wallabag installation at Uberspace.de, 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 https://getcomposer.org/installer
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

Hugo Extended 0.104.0 for Uberspace.de / CentOS 7

To create fryboyter.de I use Hugo. And for webspace I use uberspace.de. For example, when I write a new article, I create a commit for it, which I upload to a Mercurial repository on the webspace. Each new commit then triggers the execution of a script that rebuilds the page.

The script uses the compiled version of Hugo provided by the developers which is stored on the webspace. Due to recent changes to the website I now need the so called extended version of Hugo. But unfortunately it doesn’t work at Uberspace.de, because they currently use CentOS 7, so some needed packages are too stable. Or in other words too outdated. Hugo therefore aborts with the following error message.

/home/laythos/bin/hugo: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.20' not found (required by /home/laythos/bin/hugo)
/home/laythos/bin/hugo: /lib64/libstdc++.so.6: version `CXXABI_1.3.8' not found (required by /home/laythos/bin/hugo)
/home/laythos/bin/hugo: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.21' not found (required by /home/laythos/bin/hugo)

The problem is known to the developers (https://github.com/gohugoio/hugo/issues/9330), but for understandable reasons no ready compiled versions are offered for old distributions.

So in this case there are two possibilities. One creates the web page locally each time and loads it for example with rsync on the web space. Or you compile a version of Hugo that supports CentOS 7. I decided for the latter.

Compiling directly on an Uberspace should not be tried though. Because there you can use a maximum of 1.5 GB RAM. Anything that needs more will be terminated automatically. Which is the case with Hugo.

So I downloaded a virtual environment of CentOS 7 from https://www.osboxes.org and started it with VirtualBox. Then I installed golang as well as gcc-c++. The former via detours, since Go is apparently not available in the official package sources.

After that I proceeded as follows.

wget https://github.com/gohugoio/hugo/archive/refs/tags/v0.97.3.zip
unzip https://github.com/gohugoio/hugo/archive/refs/tags/v0.97.3.zip
cd hugo-0.97.3
CGO_ENABLED=1 go install --tags extended

The first command downloads the source code of the current version. The second command unpacks it. The third command changes to the directory where the files were unpacked. And the last command compiles the extended version of Hugo.

When the last command has been successfully executed, which can take a few minutes depending on your hardware, you should find the file hugo in the directory ~/go/bin/. You simply copy this file to your Uberspace. With this the creation of the website should work without error messages.

At https://e1.pcloud.link/publink/show?code=kZSMfzZx0nn3yYPAEVOyuhqvPPdgLfvF5ek I uploaded the current version of Hugo that works at Uberspace.de. If you want (and trust me), you can use it.

info
Last updated on September 24, 2022.
Version 0.104.0 created and uploaded by Hugo for Uberspcae / CentOS 7.
General