Next, install C++11 yum install devtoolset-2-gcc devtoolset-2-binutils devtoolset-2-gcc-c++įinally, use the software collections to enable it in the current shell: scl enable devtoolset-2 bash Once you have installed that, do an upgrade on yum: yum upgrade Install the devo repo: wget -O /etc//devtools-2.repo So we install the development libraries and use software control to switch in this shell. However, we don’t want to update the default gcc installation because that will break everything. If you are using gcc version 4.4, you don’t have C++11. The commands above should work, but these remain here for historic reference.Ĭheck your current C++ version: # gcc -version Note: The commands below worked for CentOS6 and devtoolset-2. Now check your C++ version again: # gcc -version When I did this it was still on devtoolset-7, so I installed that version: # yum install -y devtoolset-7 Upgrade, and then check the available devtool set versions. Install the scl release: # yum install centos-release-scl Warranty not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. This is free software see the source for copying conditions. This does not change the default compiler and should cause less problems with your system (but that is not a money back guarantee … you are own your own if it does!)Ĭheck your current C++ version: # gcc -version Here is how to install C++11 on CentOS6 or CentOS7, and temporarily activate it in a shell. CentOS is great because it is secure, but not great because it doesn’t have the latest software.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |