CentOS7安裝GCC 7.0以上版本


 

 

[root@localhost folly.lib]# yum search devtoolset
已加載插件:fastestmirror
Loading mirror speeds from cached hostfile
* base: mirrors.aliyun.com
* epel: mirrors.tuna.tsinghua.edu.cn
* extras: mirrors.aliyun.com
* updates: mirrors.aliyun.com
=============================================== N/S matched: devtoolset ===============================================
devtoolset-7-runtime.x86_64 : Package that handles devtoolset-7 Software Collection.
devtoolset-8-runtime.x86_64 : Package that handles devtoolset-8 Software Collection.
devtoolset-7-binutils.x86_64 : A GNU collection of binary utilities
devtoolset-7-gcc.x86_64 : GCC version 7
devtoolset-7-gcc-c++.x86_64 : C++ support for GCC version 7
devtoolset-7-libstdc++-devel.x86_64 : Header files and libraries for C++ development
devtoolset-8-binutils.x86_64 : A GNU collection of binary utilities
devtoolset-8-gcc.x86_64 : GCC version 8
devtoolset-8-gcc-c++.x86_64 : C++ support for GCC version 8
devtoolset-8-libstdc++-devel.x86_64 : Header files and libraries for C++ development

名稱和簡介匹配 only,使用“search all”試試。
[root@localhost folly.lib]#

 

yum install devtoolset-7-gcc.x86_64 devtoolset-7-gcc-c++.x86_64
在使用gcc7之前,輸入:source /opt/rh/devtoolset-7/enable,從4.8切換7.3

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM