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

General support questions
Post Reply
AndyRiley
Posts: 1
Joined: 2020/06/01 12:12:54

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

Post by AndyRiley » 2020/06/01 12:15:47

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?

User avatar
TrevorH
Forum Moderator
Posts: 29171
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

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

Post by TrevorH » 2020/06/01 12:49:17

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.
CentOS 6 will die in November 2020 - migrate sooner rather than later!
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 is dead, do not use it.
Full time Geek, part time moderator. Use the FAQ Luke

User avatar
jlehtone
Posts: 2940
Joined: 2007/12/11 08:17:33
Location: Finland

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

Post by jlehtone » 2020/06/01 16:08:57

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.

Post Reply

Return to “CentOS 6 - General Support”