Hi.
Looks like Centos7 includes older version of gcc.
The following steps should help:
1. Update OS and install required tools
sudo yum -y update
sudo yum -y install gcc
sudo yum -y install wget
sudo yum -y install gcc-c++
sudo yum -y install bzip2
2. Download gcc
cd ~Downloads
wget
http://ftp.mirrorservice.org/sites/sour ... 3.0.tar.gztar zxf gcc-7.3.0.tar.gz
cd gcc-7.3.0
3. Compile (this operation will take about 10-30 minutes)
./contrib/download_prerequisites
./configure --disable-multilib --enable-languages=c,c++
make -j 4
sudo make install
4. Replace
cd /usr/local/lib64
sudo cp libstdc++.so.6.0.24 /usr/lib64/
cd /usr/lib64/
sudo mv libstdc++.so.6 libstdc++.so.6.OLD
sudo ln -sf libstdc++.so.6.0.24 libstdc++.so.6
5. Checking
strings /usr/lib64/libstdc++.so.6 | grep 'GLIBCXX_3.4.2'
--- should return something like
---GLIBCXX_3.4.2
---GLIBCXX_3.4.20
---GLIBCXX_3.4.21
---GLIBCXX_3.4.22
---GLIBCXX_3.4.23
---GLIBCXX_3.4.24
---GLIBCXX_3.4.21
---GLIBCXX_3.4.24
---GLIBCXX_3.4.20
---GLIBCXX_3.4.2
---GLIBCXX_3.4.23
---GLIBCXX_3.4.22
6. OS reboot
sudo reboot
Regards,
Codelobster Team.