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.

相关推荐

  1. Centos / RedHat 安装 Redis 、MinIO、Zookeeper、Kafka

    2023-12-23 02:50:02       37 阅读
  2. LeetCode71

    2023-12-23 02:50:02       31 阅读
  3. leecode73

    2023-12-23 02:50:02       33 阅读
  4. H5/CSS 笔试面试考题(71-80)

    2023-12-23 02:50:02       43 阅读
  5. IOS面试题编程机制 71-75

    2023-12-23 02:50:02       32 阅读
  6. 73. 矩阵置零

    2023-12-23 02:50:02       55 阅读

最近更新

  1. docker php8.1+nginx base 镜像 dockerfile 配置

    2023-12-23 02:50:02       94 阅读
  2. Could not load dynamic library ‘cudart64_100.dll‘

    2023-12-23 02:50:02       100 阅读
  3. 在Django里面运行非项目文件

    2023-12-23 02:50:02       82 阅读
  4. Python语言-面向对象

    2023-12-23 02:50:02       91 阅读

热门阅读

  1. TypeScript 常见配置项

    2023-12-23 02:50:02       70 阅读
  2. python异常之try/else分句

    2023-12-23 02:50:02       57 阅读
  3. EASYEXCEL导出表格(有标题、单元格合并)

    2023-12-23 02:50:02       53 阅读
  4. 信息学奥赛一本通 2068:【例2.6】鸡兔同笼

    2023-12-23 02:50:02       70 阅读
  5. 详解Qt的底层实现机制

    2023-12-23 02:50:02       53 阅读
  6. Pandas实践_分类数据

    2023-12-23 02:50:02       43 阅读
  7. 基于NSGA2算法求解多目标优化问题的Matlab代码

    2023-12-23 02:50:02       60 阅读