- 添加库
[root@xxx ~]# vim /etc/yum.repos.d/slc6-devtoolset-8.repo
往里面添加
[devtoolset-8-rh-release]
name=devtoolset 8 rh release
baseurl=https://cbs.centos.org/repos/sclo$releasever-devtoolset-8-rh-release/x86_64/os/
gpgcheck=0
enabled=1
2.安装GCC8 G++8 GF8
[root@xxx ~]# sudo yum install devtoolset-8-gcc devtoolset-8-gcc-c++ devtoolset-8-gcc-gfortran
3.使用
[root@xxx ~]# sudo source /opt/rh/devtoolset-8/enable
参考
https://blog.youkuaiyun.com/u012453838/article/details/85286810
本文详细介绍了如何在 CentOS 系统中通过 YUM 源安装 GCC8、G++8 和 GF8 编译器,并提供了具体的步骤和命令。此外,还讲解了如何激活和使用这些新版本的编译器。

被折叠的 条评论
为什么被折叠?



