关于Centos无法正常下载?

故障案例:

[ root@sunboyytd ~ ] #yum  install  -y  vim
已加载插件:fastestmirror
Determining fastest mirrors
Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=7&arch=x86_64&repo=os&infra=stock error was
14: curl#6 - "Could not resolve host: mirrorlist.centos.org; 未知的错误"


 One of the configured repositories failed (未知),
 and yum doesn't have enough cached data to continue. At this point the only
 safe thing yum can do is fail. There are a few ways to work "fix" this:

     1. Contact the upstream for the repository and get them to fix the problem.

     2. Reconfigure the baseurl/etc. for the repository, to point to a working
        upstream. This is most often useful if you are using a newer
        distribution release than is supported by the repository (and the
        packages for the previous distribution release still work).

     3. Run the command with the repository temporarily disabled
            yum --disablerepo=<repoid> ...

     4. Disable the repository permanently, so yum won't use it by default. Yum
        will then just ignore the repository until you permanently enable it
        again or use --enablerepo for temporary usage:

            yum-config-manager --disable <repoid>
        or
            subscription-manager repos --disable=<repoid>

     5. Configure the failing repository to be skipped, if it is unavailable.
        Note that yum will try to contact the repo. when it runs most commands,
        so will have to try and fail each time (and thus. yum will be be much
        slower). If it is a very temporary problem though, this is often a nice
        compromise:

            yum-config-manager --save --setopt=<repoid>.skip_if_unavailable=true

Cannot find a valid baseurl for repo: base/7/x86_64

故障原因:因丢失yum源,没有缓存在本地进而无法使之前安装的一些软件。

解决办法:

[ root@sunboyytd ~ ] #cd /etc/yum.repos.d
[ root@sunboyytd /etc/yum.repos.d ] #ll
总用量 40
-rw-r--r--. 1 root root 1664 10月 23 2020 CentOS-Base.repo
-rw-r--r--. 1 root root 1309 10月 23 2020 CentOS-CR.repo
-rw-r--r--. 1 root root  649 10月 23 2020 CentOS-Debuginfo.repo
-rw-r--r--. 1 root root  314 10月 23 2020 CentOS-fasttrack.repo
-rw-r--r--. 1 root root  630 10月 23 2020 CentOS-Media.repo
-rw-r--r--. 1 root root 1331 10月 23 2020 CentOS-Sources.repo
-rw-r--r--. 1 root root 8515 10月 23 2020 CentOS-Vault.repo
-rw-r--r--. 1 root root  616 10月 23 2020 CentOS-x86_64-kernel.repo
[ root@sunboyytd /etc/yum.repos.d ] #rm  -rf *
[ root@sunboyytd /etc/yum.repos.d ] #ll
总用量 0
[ root@sunboyytd /etc/yum.repos.d ] #curl -o /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-7.repo
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  2523  100  2523    0     0   6117      0 --:--:-- --:--:-- --:--:--  6138
[ root@sunboyytd /etc/yum.repos.d ] #ls
CentOS-Base.repo
[ root@sunboyytd /etc/yum.repos.d ] #yum  makecache
已加载插件:fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirrors.aliyun.com
 * extras: mirrors.aliyun.com
 * updates: mirrors.aliyun.com
base                                                                                                                                                                                      | 3.6 kB  00:00:00     
extras                                                                                                                                                                                    | 2.9 kB  00:00:00     
updates                                                                                                                                                                                   | 2.9 kB  00:00:00     
(1/10): base/7/x86_64/group_gz                                                                                                                                                            | 153 kB  00:00:01     
base/7/x86_64/primary_db       FAILED                                          
http://mirrors.cloud.aliyuncs.com/centos/7/os/x86_64/repodata/6d0c3a488c282fe537794b5946b01e28c7f44db79097bb06826e1c0c88bad5ef-primary.sqlite.bz2: [Errno 14] curl#6 - "Could not resolve host: mirrors.cloud.aliyuncs.com; Unknown error"
正在尝试其它镜像。
(2/10): extras/7/x86_64/other_db                                                                                                                                                          | 154 kB  00:00:00     
(3/10): extras/7/x86_64/filelists_db                                                                                                                                                      | 305 kB  00:00:02     
(4/10): base/7/x86_64/other_db                                                                                                                                                            | 2.6 MB  00:00:06     
(5/10): updates/7/x86_64/filelists_db                                                                                                                                                     |  15 MB  00:00:09     
(6/10): base/7/x86_64/primary_db                                                                                                                                                          | 6.1 MB  00:00:03     
base/7/x86_64/filelists_db     FAILED                                          
http://mirrors.aliyuncs.com/centos/7/os/x86_64/repodata/d6d94c7d406fe7ad4902a97104b39a0d8299451832a97f31d71653ba982c955b-filelists.sqlite.bz2: [Errno 14] curl#7 - "Failed connect to mirrors.aliyuncs.com:80; Connection refused"
正在尝试其它镜像。
extras/7/x86_64/primary_db     FAILED                                                     45% [====================================                                            ] 602 kB/s |  28 MB  00:00:55 ETA 
http://mirrors.aliyuncs.com/centos/7/extras/x86_64/repodata/e12dbf10e94bc2b33b1f45e026559bc8685728b139dddae0654d96bc624c5602-primary.sqlite.bz2: [Errno 14] curl#7 - "Failed connect to mirrors.aliyuncs.com:80; Connection refused"
正在尝试其它镜像。
updates/7/x86_64/primary_db    FAILED                                                     47% [=====================================-                                          ] 739 kB/s |  29 MB  00:00:44 ETA 
http://mirrors.aliyuncs.com/centos/7/updates/x86_64/repodata/f19044932626155f0cd849e88972b84875fc85e3308b4d622844a911c4ef54d0-primary.sqlite.bz2: [Errno 14] curl#7 - "Failed connect to mirrors.aliyuncs.com:80; Connection refused"
正在尝试其它镜像。
(7/10): extras/7/x86_64/primary_db                                                                                                                                                        | 253 kB  00:00:00     
(8/10): base/7/x86_64/filelists_db                                                                                                                                                        | 7.2 MB  00:00:04     
updates/7/x86_64/other_db      FAILED                                                     56% [============================================-                                   ] 1.2 MB/s |  34 MB  00:00:22 ETA 
http://mirrors.aliyuncs.com/centos/7/updates/x86_64/repodata/14ff80eeb5b7c2c703cb151b97a17a9cec41fbe5c820b6e73a015d522e02bfe7-other.sqlite.bz2: [Errno 14] curl#7 - "Failed connect to mirrors.aliyuncs.com:80; Connection refused"
正在尝试其它镜像。
(9/10): updates/7/x86_64/other_db                                                                                                                                                         | 1.6 MB  00:00:00     
(10/10): updates/7/x86_64/primary_db                                                                                                                                                      |  27 MB  00:00:20     
元数据缓存已建立

建立好之后重新更新软件即可

 #yum  install  -y  lrzsz
已加载插件:fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirrors.aliyun.com
 * extras: mirrors.aliyun.com
 * updates: mirrors.aliyun.com
正在解决依赖关系
--> 正在检查事务
---> 软件包 lrzsz.x86_64.0.0.12.20-36.el7 将被 安装
--> 解决依赖关系完成

依赖关系解决

=================================================================================================================================================================================================================
 Package                                         架构                                             版本                                                      源                                              大小
=================================================================================================================================================================================================================
正在安装:
 lrzsz                                           x86_64                                           0.12.20-36.el7                                            base                                            78 k

事务概要
=================================================================================================================================================================================================================
安装  1 软件包

总下载量:78 k
安装大小:181 k
Downloading packages:
警告:/var/cache/yum/x86_64/7/base/packages/lrzsz-0.12.20-36.el7.x86_64.rpm: 头V3 RSA/SHA256 Signature, 密钥 ID f4a80eb5: NOKEY
lrzsz-0.12.20-36.el7.x86_64.rpm 的公钥尚未安装
lrzsz-0.12.20-36.el7.x86_64.rpm                                                                                                                                                           |  78 kB  00:00:00     
从 http://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-7 检索密钥
导入 GPG key 0xF4A80EB5:
 用户ID     : "CentOS-7 Key (CentOS 7 Official Signing Key) <security@centos.org>"
 指纹       : 6341 ab27 53d7 8a78 a7c2 7bb1 24c6 a8a7 f4a8 0eb5
 来自       : http://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-7
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  正在安装    : lrzsz-0.12.20-36.el7.x86_64                                                                                                                                                                  1/1 
  验证中      : lrzsz-0.12.20-36.el7.x86_64                                                                                                                                                                  1/1 

已安装:
  lrzsz.x86_64 0:0.12.20-36.el7                                                                                                                                                                                  

完毕!

### 回答1: CentOS 6.9是一个非常受欢迎的Linux发行版本,但它已于2020年11月30日到达终止支持阶段。这意味着CentOS 6.9不再得到官方支持和更新。因此,如果你无法下载CentOS 6.9,有以下可能的原因: 1. 官方提供的下载链接已经被移除:由于CentOS 6.9已经终止支持,官方可能会从他们的网站上移除相关的下载链接。如果你尝试从官方网站下载,可能会遇到404错误或其他下载问题。 2. 网络连接问题:你的网络可能存在问题,无法连接到下载源服务器。这可能是因为服务器停机、网络设置错误或其他网络故障等原因引起的。 3. 备用下载源问题:如果你尝试从非官方的镜像站点或其他第三方下载下载CentOS 6.9,可能会遇到下载问题。这些站点可能是不可靠的或者他们可能已经停止提供CentOS 6.9的下载。 如果你确实需要下载CentOS 6.9,我推荐你先检查官方网站是否还提供相关下载链接。如果没有提供,你可以尝试通过其他途径获取,例如通过寻找可靠的第三方下载源或者与其他具有CentOS 6.9安装文件的朋友合作。但是请注意,由于CentOS 6.9的终止支持,使用该版本可能存在安全风险,因此建议你考虑将系统升级到更新的操作系统版本。 ### 回答2: CentOS是一种开源且免费的操作系统,它提供了高度可靠的企业级解决方案。CentOS 6.9是CentOS 6系列的最新版本。 如果您无法下载CentOS 6.9,可能是以下几个原因导致的: 1. 网络连接问题:首先,您需要确保您的网络连接正常。请检查您的网络设置和连接,确保可以正常访问互联网。如果您的网络连接存在问题,您可能无法成功下载CentOS 6.9。 2. 下载源问题:您还需要检查您使用的下载源是否可用。CentOS官方网站提供了多个镜像站点供下载。如果您选择了一个不可靠的或者已失效的镜像站点,您可能无法成功下载CentOS 6.9。建议您尝试使用官方镜像站点或者其他可信赖的镜像站点。 3. 容量不足:您还需要确保您的设备有足够的磁盘空间来存储CentOS 6.9的下载文件。如果您的设备磁盘空间不足,可能无法下载成功。请检查您的磁盘空间,并确保有足够的可用空间。 如果您已经排除了以上问题,但仍然无法下载CentOS 6.9,建议您联系CentOS社区或者向技术支持部门寻求帮助。他们可能能够提供更准确的解决方案来解决您的下载问题。 ### 回答3: CentOS 6.9 是一个相对较旧的操作系统版本,因此可能会遇到无法下载的问题。有几种可能的原因导致无法下载。 首先,可能是网络连接的问题。请确保您的网络连接正常,并且可以访问互联网。您可以尝试打开其他网页或使用其他下载器来确认网络连接是否正常。如果网络连接存在问题,您可以尝试重新启动网络设备或与网络服务提供商联系以解决问题。 其次,可能是下载源(repository)的问题。CentOS 6.9 使用yum命令从特定的软件源下载软件包和更新。如果下载源不可用或不稳定,可能会导致无法下载。您可以尝试更改软件源或更新已有的软件源。您可以在CentOS官方网站上找到不同的软件源镜像以供选择,选择一个接近您的地理位置的镜像可能会提供更好的下载体验。 最后,如果您已经尝试了上述方法仍然无法下载,可能是由于您使用的操作系统版本较旧,不再受到更新和支持。在这种情况下,您可以考虑升级到更新版本的CentOS,例如CentOS 7或CentOS 8。升级到新的操作系统版本可能会解决一些兼容性和下载问题,并提供更好的功能和安全性。 总之,如果您的CentOS 6.9无法下载,您可以检查网络连接,更改下载源或考虑升级到更新的操作系统版本来解决问题。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值