Centos6系统中yum源的配置

1、备份

mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup

2、更换centos6yum源(centos6官方源已下线,建议切换centos-vault源)

wget -O /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-vault-6.10.repo

3、yum clean all && yum makecache

yum clean all && yum makecache


配置过程如下

复制代码
[root@master yum.repos.d]# mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
mv:是否覆盖"/etc/yum.repos.d/CentOS-Base.repo.backup"? 
[root@master yum.repos.d]# wget -O /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-vault-6.10.repo
--2022-10-10 15:31:43--  https://mirrors.aliyun.com/repo/Centos-vault-6.10.repo
正在解析主机 mirrors.aliyun.com... 221.204.23.239, 221.204.23.240, 221.204.23.238, ...
正在连接 mirrors.aliyun.com|221.204.23.239|:443... 已连接。
已发出 HTTP 请求,正在等待回应... 200 OK
长度:2533 (2.5K) [application/octet-stream]
正在保存至: "/etc/yum.repos.d/CentOS-Base.repo"

100%[==========================================================================>] 2,533       --.-K/s   in 0.01s   

2022-10-10 15:31:48 (201 KB/s) - 已保存 "/etc/yum.repos.d/CentOS-Base.repo" [2533/2533])

[root@master yum.repos.d]# yum clean all
已加载插件:fastestmirror, refresh-packagekit, security
Cleaning repos: base epel extras updates
清理一切
Cleaning up list of fastest mirrors
[root@master yum.repos.d]# yum makecache
已加载插件:fastestmirror, refresh-packagekit, security
Determining fastest mirrors
 * base: mirrors.aliyun.com
 * extras: mirrors.aliyun.com
 * updates: mirrors.aliyun.com
base                                                                                         | 3.7 kB     00:00     
base/group_gz                                                                                | 242 kB     00:02     
base/filelists_db                                                                            | 6.4 MB     01:00     
base/primary_db                                                                              | 4.7 MB     00:41     
base/other_db                                                                                | 2.8 MB     00:24     
epel                                                                                         | 4.7 kB     00:00     
epel/group_gz                                                                                |  97 kB     00:01     
epel/filelists_db                                                                            |  12 MB     01:49

然后就可以奔放的下载东西了!!

使用yum下载gcc

复制代码
[root@master yum.repos.d]# yum install gcc
已加载插件:fastestmirror, refresh-packagekit, security
设置安装进程
Loading mirror speeds from cached hostfile
 * base: mirrors.aliyun.com
 * extras: mirrors.aliyun.com
 * updates: mirrors.aliyun.com
解决依赖关系
--> 执行事务检查
---> Package gcc.x86_64 0:4.4.7-23.el6 will be 安装
--> 处理依赖关系 libgomp = 4.4.7-23.el6,它被软件包 gcc-4.4.7-23.el6.x86_64 需要
--> 处理依赖关系 cpp = 4.4.7-23.el6,它被软件包 gcc-4.4.7-23.el6.x86_64 需要
--> 处理依赖关系 libgcc >= 4.4.7-23.el6,它被软件包 gcc-4.4.7-23.el6.x86_64 需要
--> 处理依赖关系 cloog-ppl >= 0.15,它被软件包 gcc-4.4.7-23.el6.x86_64 需要
--> 执行事务检查
---> Package cloog-ppl.x86_64 0:0.15.7-1.2.el6 will be 安装
--> 处理依赖关系 libppl_c.so.2()(64bit),它被软件包 cloog-ppl-0.15.7-1.2.el6.x86_64 需要
--> 处理依赖关系 libppl.so.7()(64bit),它被软件包 cloog-ppl-0.15.7-1.2.el6.x86_64 需要
---> Package cpp.x86_64 0:4.4.7-23.el6 will be 安装
--> 处理依赖关系 libmpfr.so.1()(64bit),它被软件包 cpp-4.4.7-23.el6.x86_64 需要
---> Package libgcc.x86_64 0:4.4.7-17.el6 will be 升级
---> Package libgcc.x86_64 0:4.4.7-23.el6 will be an update
---> Package libgomp.x86_64 0:4.4.7-17.el6 will be 升级
---> Package libgomp.x86_64 0:4.4.7-23.el6 will be an update
--> 执行事务检查
---> Package mpfr.x86_64 0:2.4.1-6.el6 will be 安装
---> Package ppl.x86_64 0:0.10.2-11.el6 will be 安装
--> 完成依赖关系计算

依赖关系解决

====================================================================================================================
 软件包                      架构                     版本                             仓库                    大小
====================================================================================================================
正在安装:
 gcc                         x86_64                   4.4.7-23.el6                     base                    10 M
为依赖而安装:
 cloog-ppl                   x86_64                   0.15.7-1.2.el6                   base                    93 k
 cpp                         x86_64                   4.4.7-23.el6                     base                   3.7 M
 mpfr                        x86_64                   2.4.1-6.el6                      base                   157 k
 ppl                         x86_64                   0.10.2-11.el6                    base                   1.3 M
为依赖而更新:
 libgcc                      x86_64                   4.4.7-23.el6                     base                   104 k
 libgomp                     x86_64                   4.4.7-23.el6                     base                   135 k

事务概要
====================================================================================================================
Install       5 Package(s)
Upgrade       2 Package(s)

总下载量:16 M
确定吗?[y/N]:y
下载软件包:
(1/7): cloog-ppl-0.15.7-1.2.el6.x86_64.rpm                                                   |  93 kB     00:01     
(2/7): cpp-4.4.7-23.el6.x86_64.rpm                                                           | 3.7 MB     00:34     
(3/7): gcc-4.4.7-23.el6.x86_64.rpm                                                           |  10 MB     01:23     
(4/7): libgcc-4.4.7-23.el6.x86_64.rpm                                                        | 104 kB     00:00     
(5/7): libgomp-4.4.7-23.el6.x86_64.rpm                                                       | 135 kB     00:01     
(6/7): mpfr-2.4.1-6.el6.x86_64.rpm                                                           | 157 kB     00:04     
(7/7): ppl-0.10.2-11.el6.x86_64.rpm                                                          | 1.3 MB     00:14     
--------------------------------------------------------------------------------------------------------------------
总计                                                                                109 kB/s |  16 MB     02:25     
warning: rpmts_HdrFromFdno: Header V3 RSA/SHA1 Signature, key ID c105b9de: NOKEY
Retrieving key from http://mirrors.aliyun.com/centos-vault/RPM-GPG-KEY-CentOS-6
Importing GPG key 0xC105B9DE:
 Userid: "CentOS-6 Key (CentOS 6 Official Signing Key) <centos-6-key@centos.org>"
 From  : http://mirrors.aliyun.com/centos-vault/RPM-GPG-KEY-CentOS-6
确定吗?[y/N]:y
运行 rpm_check_debug 
执行事务测试
事务测试成功
执行事务
Warning: RPMDB altered outside of yum.
  正在升级   : libgcc-4.4.7-23.el6.x86_64                                                                       1/9 
  正在安装   : ppl-0.10.2-11.el6.x86_64                                                                         2/9 
  正在安装   : cloog-ppl-0.15.7-1.2.el6.x86_64                                                                  3/9 
  正在安装   : mpfr-2.4.1-6.el6.x86_64                                                                          4/9 
  正在安装   : cpp-4.4.7-23.el6.x86_64                                                                          5/9 
  正在升级   : libgomp-4.4.7-23.el6.x86_64                                                                      6/9 
  正在安装   : gcc-4.4.7-23.el6.x86_64                                                                          7/9 
  清理       : libgcc-4.4.7-17.el6.x86_64                                                                       8/9 
  清理       : libgomp-4.4.7-17.el6.x86_64                                                                      9/9 
  Verifying  : libgomp-4.4.7-23.el6.x86_64                                                                      1/9 
  Verifying  : gcc-4.4.7-23.el6.x86_64                                                                          2/9 
  Verifying  : mpfr-2.4.1-6.el6.x86_64                                                                          3/9 
  Verifying  : cloog-ppl-0.15.7-1.2.el6.x86_64                                                                  4/9 
  Verifying  : cpp-4.4.7-23.el6.x86_64                                                                          5/9 
  Verifying  : ppl-0.10.2-11.el6.x86_64                                                                         6/9 
  Verifying  : libgcc-4.4.7-23.el6.x86_64                                                                       7/9 
  Verifying  : libgcc-4.4.7-17.el6.x86_64                                                                       8/9 
  Verifying  : libgomp-4.4.7-17.el6.x86_64                                                                      9/9 

已安装:
  gcc.x86_64 0:4.4.7-23.el6                                                                                         

作为依赖被安装:
  cloog-ppl.x86_64 0:0.15.7-1.2.el6 cpp.x86_64 0:4.4.7-23.el6 mpfr.x86_64 0:2.4.1-6.el6 ppl.x86_64 0:0.10.2-11.el6

作为依赖被升级:
  libgcc.x86_64 0:4.4.7-23.el6                             libgomp.x86_64 0:4.4.7-23.el6                            

完毕!
[root@master yum.repos.d]# 
相关推荐
字节跳动数据平台20 小时前
5000 字技术向拆解 | 火山引擎多模态数据湖如何释放模思智能的算法生产力
大数据
武子康1 天前
大数据-239 离线数仓 - 广告业务实战:Flume 导入日志到 HDFS,并完成 Hive ODS/DWD 分层加载
大数据·后端·apache hive
字节跳动数据平台2 天前
代码量减少 70%、GPU 利用率达 95%:火山引擎多模态数据湖如何释放模思智能的算法生产力
大数据
得物技术2 天前
深入剖析Spark UI界面:参数与界面详解|得物技术
大数据·后端·spark
武子康2 天前
大数据-238 离线数仓 - 广告业务 Hive分析实战:ADS 点击率、购买率与 Top100 排名避坑
大数据·后端·apache hive
武子康3 天前
大数据-237 离线数仓 - Hive 广告业务实战:ODS→DWD 事件解析、广告明细与转化分析落地
大数据·后端·apache hive
大大大大晴天3 天前
Flink生产问题排障-Kryo serializer scala extensions are not available
大数据·flink
武子康5 天前
大数据-236 离线数仓 - 会员指标验证、DataX 导出与广告业务 ODS/DWD/ADS 全流程
大数据·后端·apache hive
武子康6 天前
大数据-235 离线数仓 - 实战:Flume+HDFS+Hive 搭建 ODS/DWD/DWS/ADS 会员分析链路
大数据·后端·apache hive
DianSan_ERP7 天前
电商API接口全链路监控:构建坚不可摧的线上运维防线
大数据·运维·网络·人工智能·git·servlet