DevOps.dev

Devops.dev is a community of DevOps enthusiasts sharing insight, stories, and the latest…

Follow publication

How to solve `GLIBCXX_3.4.14' not found on CentOS6.

--

Introduction

CentOS 6 was released in 2011. Some of the companies are still using CentOS 6 in their Production environment. Installing new versions of packages are very tuff. In the recent past, I faced issues while installing NodeJS version 14 on CentOS 6.4. Going through it, I thought why not write it down so that one can use for future reference. Let start with Installing NodeJS on CentOS 6.4.

Node Js Installation

We are going to build NodeJS from the source code. To build it, we need to install “Development Tools”. To install development tool we will use yum command.

sudo yum -y groupinstall “Development Tools”

Now we are ready to install NodeJS from source code. Download the source code form https://nodejs.org/dist/latest/node-v14.3.0.tar.gz using wget command. Make sure you have installed wget command.

yum install -y wgetwget — no-check-certificate https://nodejs.org/dist/latest/node-v14.3.0.tar.gz

Now, unzip the downloaded tar file and change the directory to source code directory.

tar -xvf node-v14.3.0.tar.gzcd node-v14.3.0

Now the source for NodeJS is extracted and we’re in the source directory. We can now prepare our compiler commands, by executing the configure script. After that run make command, make command is used to build and maintain the group of programs.

./configuremakemake install

Above command will take some time to install NodeJS. After above step run node -v command to check the installation it working fine or not.

But, trouble comes next when we try to run node -v command we got following error message on the screen.

/usr/local/bin/node -v/usr/local/bin/node: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.14' not found (required by /usr/local/bin/node)/usr/local/bin/node: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.18' not found (required by /usr/local/bin/node)/usr/local/bin/node: /usr/lib64/libstdc++.so.6: version `CXXABI_1.3.5' not found (required by /usr/local/bin/node)/usr/local/bin/node: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.15' not found (required by /usr/local/bin/node)/usr/local/bin/node: /lib64/libc.so.6: version `GLIBC_2.16' not found (required by /usr/local/bin/node)/usr/local/bin/node: /lib64/libc.so.6: version `GLIBC_2.17' not found (required by /usr/local/bin/node)/usr/local/bin/node: /lib64/libc.so.6: version `GLIBC_2.14' not found (required by /usr/local/bin/node)

To list GLIBC version you can use the following command, it will generate the following output:

#sudo strings /usr/lib64/libstdc++.so.6 | grep GLIBCXXGLIBCXX_3.4GLIBCXX_3.4.1GLIBCXX_3.4.2GLIBCXX_3.4.3GLIBCXX_3.4.4GLIBCXX_3.4.5GLIBCXX_3.4.6GLIBCXX_3.4.7GLIBCXX_3.4.8GLIBCXX_3.4.9GLIBCXX_3.4.10GLIBCXX_3.4.11GLIBCXX_3.4.12GLIBCXX_3.4.13GLIBCXX_FORCE_NEWGLIBCXX_DEBUG_MESSAGE_LENGTH

You can clearly see that GLIBCXX_3.4.14 , GLIBCXX_3.4.15 & GLIBCXX_3.4.18 not found. To solve the above error we need to install GLIBCXX_3.4.14, 15, 18 on CentOS 6, For that, you need to install only one package “libstdc++-4.8.5–39.el7.x86_64.rpm”

CentOS always changes their repository URL following URL will give you the repolist for different locations.

Firstly remove libstdc++-devel-4.4.7–23.el6.x86_64 from operation system.

# yum remove libstdc++-devel-4.4.7–23.el6.x86_64

Now, Install libstdc++-4.8.5–39.el7.x86_64.rpm using yum command as shown below.

# sudo yum install http://centos.hbcse.tifr.res.in/centos/7/os/x86_64/Packages/libstdc++-4.8.5-39.el7.x86_64.rpm

Now, Install, libstdc++-devel-4.8.5–39.el7.x86_64.rpm

# sudo yum install http://centos.hbcse.tifr.res.in/centos/7/os/x86_64/Packages/libstdc++-devel-4.8.5-39.el7.x86_64.rpm

After completion of above installation process run following command to check the required version of GLIBCXX is installed on the machine.

#sudo strings /usr/lib64/libstdc++.so.6 | grep GLIBCXX[aman@centOS6 ~]$ sudo strings /usr/lib64/libstdc++.so.6 | grep GLIBCXXGLIBCXX_3.4GLIBCXX_3.4.1GLIBCXX_3.4.2GLIBCXX_3.4.3GLIBCXX_3.4.4GLIBCXX_3.4.5GLIBCXX_3.4.6GLIBCXX_3.4.7GLIBCXX_3.4.8GLIBCXX_3.4.9GLIBCXX_3.4.10GLIBCXX_3.4.11GLIBCXX_3.4.12GLIBCXX_3.4.13GLIBCXX_3.4.14GLIBCXX_3.4.15GLIBCXX_3.4.16GLIBCXX_3.4.17GLIBCXX_3.4.18GLIBCXX_3.4.19GLIBCXX_DEBUG_MESSAGE_LENGTH

Now run node -v command to check the node version it will give the desired output.

[aman@CentOS6 ~]$ node -vv14.3.0

For hosting related solutions, kindly visit here ………

--

--

Published in DevOps.dev

Devops.dev is a community of DevOps enthusiasts sharing insight, stories, and the latest development in the field.

Written by Aman Singh

Innovative DevOps Engineer | AWS | GCP |Solutions Architect | Orchestrating Excellence

Responses (1)

Write a response