16

I'm not sure if node.js 18 supports centos 7 and is it a requirement to install python 3 for node.js 18?

6 Answers 6

18

Starting v18, Node.js no longer supports centos 7 and a few other Linux distros due to glibc version incompatibility. See https://github.com/nodejs/node/issues/43246.

0

yes you can, but you have to solve related issues ( upgrade make,gcc,glibc,python versions etc)

0

No, Node18 requires CentOS 8 or higher. Even if you directly install it locally, it will not take effect. There are issues with drivers such as gcc glic, so don't waste time trying, either give up Node18 or upgrade the system.

2
0

2024 update: it appears that this is possible using github.com/nodejs/unofficial-builds (source). On the target system check the glibc version:

$ ldd --version
ldd (GNU libc) 2.17

And then pull the needed archive from unofficial-builds.nodejs.org/download/release (e.g. node-v18.18.2-linux-x64-glibc-217.tar.gz).

I can't vouch for this method since this is the point I surrender and stick with the node16 release in RHEL7 epel.

-2

I am sure you can install NodeJS 18 on Centos7.

Regarding of the Python need. Yes you will need python installed, NodeJS use some python code. Python is required for building node from source

1
  • I am not so sure. And the reason is that when I try it using the method in the accepted answer, I get missing dependencies for GLIBCXX_3.4.21, GLIBC_2.28, and CXXABI_1.3.9.
    – flayman
    Dec 16, 2022 at 14:55
-4

Step 1 - curl --silent --location https://rpm.nodesource.com/setup_18.x | sudo bash -

Step 2 - sudo yum -y install nodejs

I don't think you need Python 3.

Reference - https://computingforgeeks.com/install-node-js-on-centos-rhel-rocky-linux/

1
  • 2
    This is incorrect. The reference instructions are for CentOS 8. The most recent answer from 8th of August 2022 is correct, I'm sorry to say.
    – flayman
    Dec 16, 2022 at 14:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.