云服务器yum无法解析mirrorlist.centos.org

news/2024/12/28 21:54:51/

[root~]# yum list available

已加载插件:fastestmirror

Loading mirror speeds from cached hostfile

Could not retrieve mirrorlist http://mirrorlist.centos.org?arch=x86_64&release=7&repo=sclo-sclo   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: centos-sclo-sclo/x86_64

[root ~]#

景象源的问题,更新YUM仓库源为阿里云镜像源

sudo vi /etc/yum.repos.d/CentOS-Base.repo

将原来的

[base]
name=CentOS-$releasever
enabled=1
failovermethod=priority
baseurl=http://mirrors.cloud.aliyuncs.com/centos/$releasever/os/$basearch/
gpgcheck=1
gpgkey=http://mirrors.cloud.aliyuncs.com/centos/RPM-GPG-KEY-CentOS-7
[updates]
name=CentOS-$releasever
enabled=1
failovermethod=priority
baseurl=http://mirrors.cloud.aliyuncs.com/centos/$releasever/updates/$basearch/
gpgcheck=1
gpgkey=http://mirrors.cloud.aliyuncs.com/centos/RPM-GPG-KEY-CentOS-7
[extras]
name=CentOS-$releasever
enabled=1
failovermethod=priority
baseurl=http://mirrors.cloud.aliyuncs.com/centos/$releasever/extras/$basearch/
gpgcheck=1
gpgkey=http://mirrors.cloud.aliyuncs.com/centos/RPM-GPG-KEY-CentOS-7

改成

[contrib]
name=CentOS-$releasever - Contrib - mirrors.aliyun.com
failovermethod=priority
baseurl=http://mirrors.aliyun.com/centos/$releasever/contrib/$basearch/http://mirrors.aliyuncs.com/centos/$releasever/contrib/$basearch/http://mirrors.cloud.aliyuncs.com/centos/$releasever/contrib/$basearch/
gpgcheck=1
enabled=0
gpgkey=http://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-7
[centos-sclo-rh]
name=CentOS-7 - SCLo rh
baseurl=http://vault.centos.org/centos/7/sclo/$basearch/rh/
gpgcheck=1
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-SCLo
[centos-sclo-sclo]
name=CentOS-7 - SCLo sclo
baseurl=http://vault.centos.org/centos/7/sclo/$basearch/sclo/
gpgcheck=1
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-SCLo


http://www.ppmy.cn/news/1558893.html

相关文章

麒麟操作系统启停微服务jar包脚本.sh

#! /bin/bash # 端口号 PORTS(9054 9051 9056 9052 9055 9059 12010 9057 9060) # 模块 MODULES(DataMiniosService HealthyService IntegrationService ManagementService ProductService SystemService TheGateway ShowService AlgorithmService) # 模块名称 MODULE_NAMES(数…

智能运维赋能江苏汽车制造

——打造高效“智控工厂”新典范 江苏某大型汽车零部件制造企业肩负着为全国多家知名整车厂供应高品质零部件的重任。随着生产规模的不断扩大&#xff0c;设备的长时间高负荷运转带来了故障风险&#xff0c;而传统人工巡检难以满足实时管理需求。若无法及时发现并处理设备异常&…

CSS系列(34)-- Scroll-driven Animations详解

前端技术探索系列&#xff1a;CSS Scroll-driven Animations详解 &#x1f4dc; 致读者&#xff1a;探索滚动动画的艺术 &#x1f44b; 前端开发者们&#xff0c; 今天我们将深入探讨 CSS Scroll-driven Animations&#xff0c;这个强大的滚动动画特性。 基础概念 &#x1…

Ubuntu离线安装Docker容器

前言 使用安装的工具snap安装在沙箱中&#xff0c;并且该沙箱之外的权限有限。docker无法从其隔离的沙箱环境访问外部文件系统。 目录 前言准备环境卸载已安装的Docker环境快照安装的Dockerapt删除Docker 安装docker-compose下载执行文件将文件移到 /usr/local/bin赋予执行权限…

如何注册华为云国际版账户:详细步骤指南

华为云作为全球知名的云计算服务提供商&#xff0c;提供了丰富的云服务和解决方案。无论是企业还是个人开发者&#xff0c;注册华为云国际版账户都是开启云计算之旅的第一步。我们九河云通过本文将为您详细介绍华为云国际版的注册流程。 第一步&#xff1a;访问华为云国际版官网…

【蓝桥杯——物联网设计与开发】拓展模块4 - 脉冲模块

目录 一、脉冲模块 &#xff08;1&#xff09;资源介绍 &#x1f505;原理图 &#x1f505;采集原理 &#xff08;2&#xff09;STM32CubeMX 软件配置 &#xff08;3&#xff09;代码编写 &#xff08;4&#xff09;实验现象 二、脉冲模块接口函数封装 三、踩坑日记 &a…

python学opencv|读取图像(二十一)使用cv2.circle()绘制圆形进阶

【1】引言 前序已经掌握了使用cv2.circle()绘制圆形的基本操作&#xff0c;相关链接为&#xff1a; python学opencv|读取图像&#xff08;二十&#xff09;使用cv2.circle()绘制圆形-CSDN博客 由于圆形本身绘制起来比较简单&#xff0c;因此可以自由操作的空间也就大&#x…

idea 8年使用整理

文章目录 前言idea 8年使用整理1. 覆盖application配置2. 启动的时候设置编辑空间大小&#xff0c;并忽略最大空间3. 查询类的关系4. 查看这个方法的引用关系5. 查看方法的调用关系5.1. 查看被调用关系5.2. 查看调用关系 6. 方法分隔线7. 选择快捷键类型8. 代码预览插件9. JReb…