Centos 7.6 gcc (GCC) 7.3.1 20180303 (Red Hat 7.3.1-5)

复制代码
yum install -y wget lftp gcc gcc-c++ make openssl-devel pcre-devel pcre

yum install -y http://mirror.centos.org/centos/7/extras/x86_64/Packages/centos-release-scl-rh-2-3.el7.centos.noarch.rpm

sudo yum install -y http://mirror.centos.org/centos/7/extras/x86_64/Packages/centos-release-scl-2-3.el7.centos.noarch.rpm

yum provides gcc

Loaded plugins: fastestmirror

Loading mirror speeds from cached hostfile

* centos-sclo-rh: mirrors.bupt.edu.cn

devtoolset-7-gcc-7.1.1-2.1.el7.x86_64 : GCC version 7

Repo : centos-sclo-rh

Matched from:

Provides : gcc = 7.1.1-2.1.el7

gcc-4.8.5-44.el7.x86_64 : Various compilers (C, C++, Objective-C, Java, ...)

Repo : base

devtoolset-7-gcc-7.1.1-2.1.el7.x86_64 : GCC version 7

Repo : @centos-sclo-rh

Matched from:

Provides : gcc = 7.1.1-2.1.el7

gcc-4.8.5-44.el7.x86_64 : Various compilers (C, C++, Objective-C, Java, ...)

Repo : @base

复制代码
yum install devtoolset-7-gcc-c++ -y

source /opt/rh/devtoolset-7/enable
gcc --version
g++ --version
mv /usr/bin/gcc /usr/bin/gcc-4.8.5
ln -s /opt/rh/devtoolset-7/root/bin/gcc /usr/bin/gcc
gcc --version

gcc --version

gcc (GCC) 7.3.1 20180303 (Red Hat 7.3.1-5)

Copyright (C) 2017 Free Software Foundation, Inc.

This is free software; see the source for copying conditions. There is NO

warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

g++ --version

g++ (GCC) 7.3.1 20180303 (Red Hat 7.3.1-5)

Copyright (C) 2017 Free Software Foundation, Inc.

This is free software; see the source for copying conditions. There is NO

warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

相关推荐
人道领域2 分钟前
SSM框架从入门到入土(AOP面向切面编程)
java·开发语言
铅笔侠_小龙虾3 分钟前
Flutter 实战: 计算器
开发语言·javascript·flutter
2的n次方_20 分钟前
Runtime 执行提交机制:NPU 硬件队列的管理与任务原子化下发
c语言·开发语言
2501_9447114338 分钟前
JS 对象遍历全解析
开发语言·前端·javascript
凡人叶枫1 小时前
C++中智能指针详解(Linux实战版)| 彻底解决内存泄漏,新手也能吃透
java·linux·c语言·开发语言·c++·嵌入式开发
Tony Bai1 小时前
再见,丑陋的 container/heap!Go 泛型堆 heap/v2 提案解析
开发语言·后端·golang
小糯米6011 小时前
C++顺序表和vector
开发语言·c++·算法
froginwe112 小时前
JavaScript 函数调用
开发语言
独望漫天星辰2 小时前
C++ 多态深度解析:从语法规则到底层实现(附实战验证代码)
开发语言·c++
无小道2 小时前
Qt——事件简单介绍
开发语言·前端·qt