npm:relocation error: /lib64/libnode.so.93: symbol FIPS_selftest, version OPENSSL_1_1_0g not defined in file libcrypto.so.1.1 with link time reference
Asked Answered
B

2

7

after installing nodejs, npm and yarn via yum install command whenever I try to run npm command I get the following error

node: relocation error: /lib64/libnode.so.93: symbol FIPS_selftest, version OPENSSL_1_1_0g not defined in file libcrypto.so.1.1 with link time reference

This is happening on CentOS 7 with the latest updates installed.

NAME="CentOS Linux"
VERSION="7 (Core)"
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="7"
PRETTY_NAME="CentOS Linux 7 (Core)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:centos:centos:7"
HOME_URL="https://www.centos.org/"
BUG_REPORT_URL="https://bugs.centos.org/"

CENTOS_MANTISBT_PROJECT="CentOS-7"
CENTOS_MANTISBT_PROJECT_VERSION="7"
REDHAT_SUPPORT_PRODUCT="centos"
REDHAT_SUPPORT_PRODUCT_VERSION="7"

I searched the web for this error and I cannot find anything relevant and so far this is happening on my 5th server.

I tried removing nodejs, npm and yarn and even installing older versions but with no results. Also I tried removing openssl and again that didn't help.

Thanks

Brawny answered 4/4, 2022 at 9:12 Comment(0)
W
6

I also encountered a similar problem. I found out that it is because I have the source code of another version 1.1.1 of openssl in my system, and the version installed in the system is 1.0.2; and I set the program runtime library file search path LD_LIBRARY_PATH to the 1.1.1 version openssl source code path, because the versions before and after openssl are incompatible, when the system runs npm, it automatically finds the 1.1.1 version of openssl according to the LD_LIBRARY_PATH path, so an error is reported.
Solution: export LD_LIBRARY_PATH="" to let the program automatically find the version of openssl installed on the system

Within answered 29/10, 2022 at 9:47 Comment(0)
J
0

I had this problem when installing NODE JS on CENTOS 7 after installing OPENSSL 1_1_1. I spent 4 days looking for solutions. What worked for me: installing nodejs version 16.11.1 which does not require OPENSSL_1_1_0g

sudo yum install curl -y 

curl https://raw.githubusercontent.com/creationix/nvm/master/install.sh | bash

source ~/.bashrc

nvm install 16.11.1

Installing alternative versions through configuration did not help:

./config -Wl,-rpath="/usr/local/openssl_OpenSSL_1_1_1e/lib" -Wl,--enable-new-dtags --prefix="/usr/local/openssl_OpenSSL_1_1_1e" --openssldir="/usr/local/openssl_OpenSSL_1_1_1e/ssl"

Did not help: export LD_LIBRARY_PATH=/usr/local/openssl_OpenSSL_1_1_1e/lib"

Did not help: adding to /etc/ld.so.conf.d/libc.conf these lines /usr/local/openssl/lib /usr/local/openssl_OpenSSL_1_1_1e/lib and executing the command ldconfig -v

Did not help: echo "LD_LIBRARY_PATH=/usr/local/openssl_OpenSSL_1_1_1e/lib" >> /etc/environment

Journalize answered 18/11, 2023 at 3:23 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.