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.

相关推荐
kaikaile199511 分钟前
使用Python进行数据可视化的初学者指南
开发语言·python·信息可视化
大P哥阿豪12 分钟前
Go defer(二):从汇编的角度理解延迟调用的实现
开发语言·汇编·后端·golang
意疏22 分钟前
【Python篇】PyCharm 安装与基础配置指南
开发语言·python·pycharm
GuokLiu2 小时前
250708-通过两块硬盘拷贝DeepSeek两个满血版模型的bash脚本
开发语言·chrome·bash
iCxhust8 小时前
c# U盘映像生成工具
开发语言·单片机·c#
yangzhi_emo9 小时前
ES6笔记2
开发语言·前端·javascript
emplace_back10 小时前
C# 集合表达式和展开运算符 (..) 详解
开发语言·windows·c#
jz_ddk10 小时前
[学习] C语言数学库函数背后的故事:`double erf(double x)`
c语言·开发语言·学习
萧曵 丶10 小时前
Rust 所有权系统:深入浅出指南
开发语言·后端·rust