Nodejs 18 On CentOS 7

Home » CentOS » Nodejs 18 On CentOS 7
CentOS 2 Comments

I am currently running V14.19.3 of nodejs on CentOS 7

I found this article:
https://computingforgeeks.com/install-node-js-on-CentOS-rhel-rocky-linux/
to update to 18

I import the repo just fine. when I do :
yum -y install nodejs

I get :
Package 2:nodejs-14.19.3-1nodesource.x86_64 already installed and latest version Nothing to do

how do I install 18?

more /etc/yum.repos.d/nodesource-el7.repo
[nodesource]
name=Node.js Packages for Enterprise Linux 7 – $basearch baseurl=https://rpm.nodesource.com/pub_18.x/el/7/$basearch failovermethod=priority enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/NODESOURCE-GPG-SIGNING-KEY-EL

[nodesource-source]
name=Node.js for Enterprise Linux 7 – $basearch – Source baseurl=https://rpm.nodesource.com/pub_18.x/el/7/SRPMS
failovermethod=priority enabled=0
gpgkey=file:///etc/pki/rpm-gpg/NODESOURCE-GPG-SIGNING-KEY-EL
gpgcheck=1

jerry

2 thoughts on - Nodejs 18 On CentOS 7

  • So I downloaded teh rpm and tried rpm -i ../Downloads/nodejs-18.4.0-1nodesource.x86_64.rpm error: Failed dependencies:
    libc.so.6(GLIBC_2.25)(64bit) is needed by nodejs-2:18.4.0-1nodesource.x86_64
    libc.so.6(GLIBC_2.28)(64bit) is needed by nodejs-2:18.4.0-1nodesource.x86_64
    libm.so.6(GLIBC_2.27)(64bit) is needed by nodejs-2:18.4.0-1nodesource.x86_64
    libstdc++.so.6(CXXABI_1.3.9)(64bit) is needed by nodejs-2:18.4.0-1nodesource.x86_64
    libstdc++.so.6(GLIBCXX_3.4.20)(64bit) is needed by nodejs-2:18.4.0-1nodesource.x86_64
    libstdc++.so.6(GLIBCXX_3.4.21)(64bit) is needed by nodejs-2:18.4.0-1nodesource.x86_64

    Where are these libraries for a CentOS 7 server ?

    Jerry

  • Hello Jerry,

    Am 17.06.2022 20:10, schrieb Jerry Geis:

    You will not find those libraries in those versions for CentOS 7. Even if you did, installing them would most likely break more than fix anything.

    From a quick test, it seems the pub_18.x repository is just broken. pub_17.x installs fine.

    I would suggest to either use 17.x and/or file a bug on the NodeSource’s GitHub repo.

    Kind regards,
    Steve