Ubuntu 18.04 lts install nodejs run node or npm error prompt

nodejs sudo apt install nodejsopenssl nodejsnpm
/usr/bin/nodejs: /usr/local/openssl/lib/libssl.so.1.0.0: no version information available (required by /usr/bin/nodejs)
/usr/bin/nodejs: /usr/local/openssl/lib/libssl.so.1.0.0: no version information available (required by /usr/bin/nodejs)
/usr/bin/nodejs: /usr/local/openssl/lib/libssl.so.1.0.0: no version information available (required by /usr/bin/nodejs)
/usr/bin/nodejs: /usr/local/openssl/lib/libcrypto.so.1.0.0: no version information available (required by /usr/bin/nodejs)
/usr/bin/nodejs: /usr/local/openssl/lib/libcrypto.so.1.0.0: no version information available (required by /usr/bin/nodejs)
Jul.05,2022

the default source of Ubuntu Node.js is relatively old. It is recommended to use the official source of Node.js

.
-sharp cat << EOF > /etc/apt/sources.list.d/nodesource.list 
deb http://deb.nodesource.com/node_8.x bionic main
deb-src http://deb.nodesource.com/node_8.x bionic main
EOF

-sharp apt update
-sharp apt install nodejs

is it your own random compilation and installation that spoiled the running environment of the system? Why did you all go to / usr/local/lib/ to find the dependence of openssl? There must be something wrong with the incompatible version

Menu