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.

相关推荐
2501_9167665421 小时前
【Java】代理模式---静态代理与动态代理
java·开发语言·代理模式
写代码的【黑咖啡】21 小时前
Python常用数据处理库全解析
开发语言·python
缺点内向21 小时前
Java:轻松实现 Excel 文档属性添加
java·开发语言·excel
刺客xs21 小时前
c++多线程 线程池的实现
开发语言·c++
HappyBoy_201921 小时前
MybatisPlus IPage分页查询工具类
java·开发语言
爱敲点代码的小哥21 小时前
类型转换 递归算法 编译错误 装箱和拆箱 知识点
开发语言·c#
南风微微吹21 小时前
【2026年3月最新】计算机二级Python题库下载安装教程~共19套真题
开发语言·python·计算机二级python
huatian521 小时前
Rust 语法整理
开发语言·后端·rust
阿蔹21 小时前
Python基础语法三---函数和数据容器
开发语言·python
xingzhemengyou121 小时前
Python 多线程同步
开发语言·python