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.

相关推荐
jiay226 分钟前
【.net10】顶级程序语句
java·开发语言
淼澄研学1 小时前
Python进阶实战:深入解析推导式与生成器等5大核心特性
开发语言·python
米码收割机2 小时前
【Python】Django 电子设备商城系统(源码+说明文档)[独一无二]
开发语言·python·django
互联网中的一颗神经元2 小时前
小白python入门 - 38. 动态内容:接口优先与自动化扫盲
开发语言·python·自动化
黑客-秋凌2 小时前
使用Python+selenium实现第一个自动化测试脚本
开发语言·自动化测试·软件测试·python·selenium·测试工具
geovindu3 小时前
CSharp: Iterative Algorithms
开发语言·后端·算法·c#·.net·迭代算法
一只月月鸟呀3 小时前
移动端tap与click的区别 && 点透事件
开发语言·前端·javascript
雨落在了我的手上3 小时前
Java数据结构(六):链表的介绍
java·开发语言·数据结构
影寂ldy3 小时前
C# HttpClient 分片下载、断点续传、暂停取消(完整项目知识点)
开发语言·c#
独隅3 小时前
DevEco Code Plan+Build 双 Agent 协同开发效率实测
java·开发语言