2024.01.16 openssl.soのLoadError

AlmaLinux 9.0だと、opnesslが新しくなっていてopenssl 1.1.1をロードできない。

libssl.so.1.1: cannot open shared object file: No such file or directory - /home/matsui/.anyenv/envs/rbenv/versions/2.6.1/lib/ruby/2.6.0/x86_64-linux/openssl.so (LoadError)

AlmaLinux 9.0では、openssl 3.0.7が入ってた。

# rpm -qa | grep openssl
openssl-libs-3.0.7-24.el9.x86_64
openssl-devel-3.0.7-24.el9.x86_64
openssl-3.0.7-24.el9.x86_64

対応

ここから、openssl 1.1.1を落としてきて、手動でインストール
https://www.openssl.org/source/

# curl -L https://www.openssl.org/source/openssl-1.1.1w.tar.gz
# tar zxvf openssl-3.1.1w.tar.gz
# cd openssl-3.1.1w
# ./Configure
# make
# make install

# ll /usr/local/lib64/libssl.so.1.1 
-rwxr-xr-x. 1 root root 689456 Jan 15 22:27 /usr/local/lib64/libssl.so.1.1

ld.so.confに読み込むディレクトリを設定

# cat /etc/ld.so.conf.d/local.conf 
/usr/local/lib64

即読み込み

# ldconfig

Error

# ./Configure 
Can't locate FindBin.pm in @INC (you may need to install the FindBin module) (@INC contains: /usr/local/lib64/perl5/5.32 /usr/local/share/perl5/5.32 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5) at ./Configure line 15.
BEGIN failed--compilation aborted at ./Configure line 15.

対応

yum install perl-FindBin.noarch
Can't locate File/Compare.pm in @INC (you may need to install the File::Compare module) (@INC contains: . /usr/local/lib64/perl5/5.32 /usr/local/share/perl5/5.32 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5) at ./util/add-depends.pl line 16.
BEGIN failed--compilation aborted at ./util/add-depends.pl line 16.
make[1]: *** [Makefile:264: depend] Error 2
make[1]: Leaving directory '/usr/local/src/openssl-1.1.1w'
make: *** [Makefile:174: all] Error 2

対応

yum install perl-File-Compare.noarch
yum install perl-File-Compare.noarch