• Centos7升级gcc版本方法之一使用scl软件集


    Centos7 gcc版本默认4.8.3,Red Hat 为了软件的稳定和版本支持,yum 上版本也是4.8.3,所以无法使用yum进行软件更新,所以使用scl。

    scl软件集(Software Collections),是为了给 RHEL/CentOS 用户提供一种以方便、安全地安装和使用应用程序和运行时环境的多个(而且可能是更新的)版本的方式,同时避免把系统搞乱。

    使用scl升级gcc步骤:

    1.安装scl源:

    yum install centos-release-scl scl-utils-build

    2.列出scl有哪些源可以用

    yum list all --enablerepo='centos-sclo-rh'

    3.安装5.3版本的gcc、gcc-c++、gdb

    yum install devtoolset-4-gcc.x86_64 devtoolset-4-gcc-c++.x86_64 devtoolset-4-gcc-gdb-plugin.x86_64 

    4.查看从 SCL 中安装的包的列表:

    scl --list 或 scl -l

    5.切换版本

    切换前查看gcc版本

    gcc -v

     切换版本:

    scl enable devtoolset-4 bash

    查看版本

    6.使用exit 退出当前scl版本的bash环境

    scl常用命令

    1
    2
    3
    4
    5
    scl --list 或scl -l
    scl --help 或 scl -h
    scl enable <scl-package-name> <command>  #使用scl来执行command命令
    scl enable  devtoolset-4 bash  #使用scl创建一个scl包的bash会话环境
    exit  #退出当前scl bash环境,恢复成系统bash环境

      

     转自:https://www.cnblogs.com/dj0325/p/8481092.html

  • 相关阅读:
    Spring Boot
    Spring Boot Tomcat配置详解
    Spring Boot读取配置的 5 种方式
    Spring Boot日志集成实战
    Spring Boot国际化开发实战
    Spring Boot整合 Thymeleaf 模板引擎
    Spring Boot Debug调试
    Spring Boot实现热部署
    Exchange Cards(dfs)
    Dungeon Master
  • 原文地址:https://www.cnblogs.com/longronglang/p/9778039.html
Copyright © 2020-2023  润新知