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

相关推荐
Cachel wood12 分钟前
python round四舍五入和decimal库精确四舍五入
java·linux·前端·数据库·vue.js·python·前端框架
Youkiup20 分钟前
【linux 常用命令】
linux·运维·服务器
qq_2975046124 分钟前
【解决】Linux更新系统内核后Nvidia-smi has failed...
linux·运维·服务器
_oP_i29 分钟前
.NET Core 项目配置到 Jenkins
运维·jenkins·.netcore
weixin_4373982137 分钟前
Linux扩展——shell编程
linux·运维·服务器·bash
小燚~39 分钟前
ubuntu开机进入initramfs状态
linux·运维·ubuntu
小林熬夜学编程1 小时前
【Linux网络编程】第十四弹---构建功能丰富的HTTP服务器:从状态码处理到服务函数扩展
linux·运维·服务器·c语言·网络·c++·http
炫彩@之星1 小时前
Windows和Linux安全配置和加固
linux·windows·安全·系统安全配置和加固
上海运维Q先生1 小时前
面试题整理15----K8s常见的网络插件有哪些
运维·网络·kubernetes
hhhhhhh_hhhhhh_1 小时前
ubuntu18.04连接不上网络问题
linux·运维·ubuntu