Project

General

Profile

Incompatible library version trying to run Redmine 5.0-stable in Ubuntu 22.04

Added by Alexandre Rozante over 1 year ago

Hi friends!
This is a clue for those receiving 'strange' incompatible library version messages. In fact, it´s already solved to me.

I installed Redmine 5.0-stable in an Ubuntu 22.04LTS server running on AWS. It worked fine with WeBrick, but not with Apache2 (with Phusion Passenger). The error message was:
"incompatible library version - /home/pats/.rvm/gems/ruby-3.1.2/gems/strscan-3.0.4/lib/strscan.so"

I installed Ruby 3.1.2p20 with RVM (trying to avoid run as root), and Rails 7.0.4 (the most updated available versions).

But, when we install Passenger (e.g. sudo apt-get install -y libapache2-mod-passenger) another Ruby is installed to the root account (3.0.2 in my scenario).

The apache envvars config file was changed, to use the account used to install Ruby and Redmine, but this didn't solved the error message.

So, after some research, I added this single configuration line in my virtual host configuration file (000-default.conf):

PassengerDefaultRuby /home/<user>/.rvm/rubies/ruby-3.1.2/bin/ruby

Where <user> its the account used to install Ruby and Redmine.

After an Apache service restart, Redmine worked fine.