5

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

Zak
  • 6,976
  • 2
  • 26
  • 48
Dimitar Dimov
  • 91
  • 2
  • 7

1 Answers1

4

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

Tyler2P
  • 2,324
  • 26
  • 22
  • 31
junkyao
  • 41
  • 2