Page 1 of 1

Deploy a c++ program with c++11 support in older CentOS machine

Posted: 2020/06/01 12:15:47
by AndyRiley
My program depends on libstdc++.so.6 which depends on /lib64/libstdc++.so.6.0.19

But my older CentOS has libstdc++.so.6 => libstdc++.so.6.0.13

Questions

1. Should I check the version of the libstdc++.so.6 if less than 0.19?
2. How do I update the libstdc++ to libstdc++.so.6.0.19?

Re: Deploy a c++ program with c++11 support in older CentOS machine

Posted: 2020/06/01 12:49:17
by TrevorH
Moved to CentOS 6 General Support since only CentOS 6 ships this file.

And the answer to your questions are:

1) Probably
2) No. You cannot do this without breaking your entire system.

Since CentOS 6 now has less than 6 months of life left before it goes EOL you should probably just schedule a replacement of that system with either CentOS 7 or 8. One has 6.0.19 and the other 6.0.25.

Re: Deploy a c++ program with c++11 support in older CentOS machine

Posted: 2020/06/01 16:08:57
by jlehtone
If you want C++11 support on CentOS 6, then install devtoolset-8 from SCL:

Code: Select all

yum install centos-release-scl-rh
yum install devtoolset-8-toolchain
That gives you GCC 8.3.1, which is more than capable to compile c++11 code.

That won't change the libstdc++.so.6 from libstdc++.so.6.0.13.