Vue normale

Reçu aujourd’hui — 30 juillet 2025PAB's blog

Ruby 2.7 with RVM on Debian Trixie

30 juillet 2025 à 10:15

If you need to install ruby 2.7 with RVM on Debian Trixie (to maintain old systems that have not yet been migrated to newer versions of Ruby) then you can proceed as follows.

First install RVM and dependencies as you are used to doing it.

Then let's instruct RVM to be able to rapatriate an old version of OpenSSL (Debian 13 Trixie incorporates OpenSSL 3.5.1, this version is too recent for compiling Ruby 2.7.x)

echo "openssl_version=1.1.1w" >> ~/.rvm/user/db

Open ~/.rvm/scripts/functions/pkg and remove "no-krb5" in the following line

configure+=( -I$rvm_usr_path/include -L$rvm_usr_path/lib zlib "${openssl_use_asm[@]}" no-krb5 ) 

which becomes

configure+=( -I$rvm_usr_path/include -L$rvm_usr_path/lib zlib "${openssl_use_asm[@]}") 

Then ask RVM to retrieve the SSL version we asked:

rvm pkg install openssl

You can now install Ruby 2.7.x using this OpenSSL version rather than the system lib:

rvm install 2.7.4 --with-openssl-dir=~/.rvm/usr

 

PgAdmin 4 on Debian 13 Trixie

30 juillet 2025 à 10:03

As I speak, there is no repository for PgAdmin4 targeting Debian 13 Trixie. I have no doubt this will change soon with the official release of Debian Trixie in a few days.

If you are impatient, it is however possible to install PgAdmin4 as a Python library and launch it as a service for easy use.

Here is how you can proceed.

As root or with sudo, create a pgadmin4 folder in /opt and change the owner for non-root user

sudo mkdir /opt/pgadmin4
sudo chown $USER /opt/pgadmin4

Now is time to create the folders needed by pgadmin4 to operate:

sudo mkdir /var/lib/pgadmin
sudo mkdir /var/log/pgadmin
sudo chown $USER /var/lib/pgadmin
sudo chown $USER /var/log/pgadmin

Then it is possible to install pgadmin4 in a virtualenv :

cd /opt/pgadmin4
python3 -m venv pgadmin4
source pgadmin4/bin/activate
pip install pgadmin4

and to launch pgadmin4:

pgadmin4

If it launches well, you can visit http://127.0.0.1:5050/ with your browser to start using pgadmin4.

If you would like pgadmin4 server to start as a service, you can create a pgadmin4.service file in /etc/systemd/system/ with the following content:

[Unit]
Description=Pgadmin4 Service
After=network.target

[Service]
User=pab
Group=pab
WorkingDirectory=/opt/pgadmin4/pgadmin4
Environment="PATH=/opt/pgadmin4/pgadmin4/bin"
ExecStart=/opt/pgadmin4/pgadmin4/bin/pgadmin4
PrivateTmp=true

[Install]
WantedBy=multi-user.target

You can then start and enable it:

systemctl daemon-reload
systemctl start pgadmin4
systemctl enable pgadmin4
❌