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