centos换源安装升级gcc

使用devtools升级安装的时候,由于此库已经停止更新 了,因此需要切换阿里源

SCL+Devtoolset 安装与使用笔记-腾讯云开发者社区-腾讯云 (tencent.com)https://cloud.tencent.com/developer/article/1889181

1 yum 安装

yum install centos-release-scl centos-release-scl-rh

2 换源CentOS-SCLo-scl-rh

打开 CentOS-SCLo-scl-rh.repo

CentOS-SCLo-rh.repo

Please see http://wiki.centos.org/SpecialInterestGroup/SCLo for more

information

[centos-sclo-rh]

name=CentOS-7 - SCLo rh

#baseurl=http://mirror.centos.org/centos/7/sclo/$basearch/rh/

mirrorlist=http://mirrorlist.centos.org?arch=$basearch\&release=7\&repo=sclo-rh

gpgcheck=1

enabled=1

gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-SCLo

[centos-sclo-rh-testing]

name=CentOS-7 - SCLo rh Testing

baseurl=http://buildlogs.centos.org/centos/7/sclo/$basearch/rh/

gpgcheck=0

enabled=0

gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-SCLo

[centos-sclo-rh-source]

name=CentOS-7 - SCLo rh Sources

baseurl=http://vault.centos.org/centos/7/sclo/Source/rh/

gpgcheck=1

enabled=0

gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-SCLo

[centos-sclo-rh-debuginfo]

name=CentOS-7 - SCLo rh Debuginfo

baseurl=http://debuginfo.centos.org/centos/7/sclo/$basearch/

gpgcheck=1

enabled=0

gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-SCLo

2 换源CentOS-SCLo-scl

SCL+Devtoolset 安装与使用笔记-腾讯云开发者社区-腾讯云 (tencent.com)https://cloud.tencent.com/developer/article/1889181

CentOS-SCLo-sclo.repo # # Please see http://wiki.centos.org/SpecialInterestGroup/SCLo for more # information [centos-sclo-sclo] name=CentOS-6 - SCLo sclo #baseurl=http://vault.centos.org/centos/6/sclo/$basearch/sclo/ baseurl=https://mirrors.aliyun.com/centos-vault/6.9/sclo/x86_64/sclo/ gpgcheck=1 enabled=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-SCLo [centos-sclo-sclo-testing] name=CentOS-6 - SCLo sclo Testing baseurl=http://buildlogs.centos.org/centos/6/sclo/$basearch/sclo/ gpgcheck=0 enabled=0 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-SCLo [centos-sclo-sclo-source] name=CentOS-6 - SCLo sclo Sources baseurl=http://vault.centos.org/centos/6/sclo/Source/sclo/ gpgcheck=1 enabled=0 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-SCLo [centos-sclo-sclo-debuginfo] name=CentOS-6 - SCLo sclo Debuginfo baseurl=http://debuginfo.centos.org/centos/6/sclo/$basearch/ gpgcheck=1 enabled=0 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-SCLo

需要将所有的6全局替换为6

3 使能bash

source /opt/rh/devtoolset-11/enable

相关推荐
CS_素锦少年1 小时前
Linux_kernel驱动开发11
linux·运维·驱动开发
结衣结衣.2 小时前
Linux——进程状态
linux·运维·服务器·c语言·笔记·学习
li星野2 小时前
面试问题001
linux·开发语言·面试
blaizeer2 小时前
Linux 入门:简单的基础操作
linux·运维·服务器
Eliauk &2 小时前
【docker】通过云服务器安转Docker
java·运维·服务器·spring cloud·docker·容器
GottenZZP3 小时前
如何利用Samba跨平台分享Ubuntu文件夹
linux·运维·ubuntu
666IDCaaa4 小时前
高防服务器的优势与劣势分析
运维·服务器·网络
看星星的派大星4 小时前
通过 汇编 分析 结构体
linux·汇编
追风赶月、4 小时前
【Linux】深刻理解操作系统的管理
linux·服务器
Xiao Tong3334 小时前
linux第一课(操作系统核心)
linux·运维·服务器