报错信息

    │               (SSH client, X server and network tools)               │
│ │
│ ⮞ SSH session to root@192.168.117.166 │
│ • Direct SSH : ✓ │
│ • SSH compression : ✓ │
│ • SSH-browser : ✓ │
│ • X11-forwarding : ✗ (disabled or not supported by server) │
│ │
│ ⮞ For more info, ctrl+click on help or visit our website. │
└──────────────────────────────────────────────────────────────────────┘ Last failed login: Tue Jul 2 16:39:04 CST 2024 from 192.168.117.1 on ssh:notty
There were 2 failed login attempts since the last successful login.
Last login: Tue Jul 2 16:38:05 2024
[root@localhost ~]# wget -O /etc/yum.repos.d/docker-ce.repo https://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo
-bash: wget: 未找到命令
[root@localhost ~]# yum -y install wget
已加载插件: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

解决思想:换源

第一步:查看系统版本

cat /etc/redhat-release

我的:

[root@localhost yum.repos.d]# cat /etc/redhat-release
CentOS Linux release 7.6.1810 (Core)

是7.6.1810版本

第二步:下载源

wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo

注意,这边的7是大版本号

如果没有安装wget:

curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo

第三步:

执行:

yum clean all

yum makecache

yum -y update

解决报错

curl#6 - "Could not resolve host: mirrorlist.centos.org; 未知的错误"

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; 未知的错误"解决yum下载报错的更多相关文章

  1. yum 安装报错: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; Unknown error"

    [root@venn09 ~]# yum install -y vim Loaded plugins: fastestmirror Could not retrieve mirrorlist http ...

  2. CentOS报错:Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=7&arch=x86_64&repo=os&infra=stock32 error was 14: curl#6 - "Could not resolve host: mirrorlist.centos.org; Unknown error"

    今天安装完带图形界面的CentOS 7后,在Terminal中运行yum安装命令时报了以下错误: Could not retrieve mirrorlist http://mirrorlist.cen ...

  3. Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=7&arch=x86_64&repo=os&infra=stock32 error was 14: curl#6 - "Could not resolve host: mirrorlist.centos.org; Unknown error"

     今天安装完带图形界面的CentOS 7后,在Terminal中运行yum安装命令时报了以下错误: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 ...

  4. Linux安装yum install gcc-c++出错: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...

    错误如图: 解决办法: 1.修改配置文件 /etc/resolv.conf,该配置文件如下: 2.输入:gedit resolv.conf,修改配置文件内容如下: 3.然后重启: 4.重新进行安装: ...

  5. Bug Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=7&arch=x86_64&repo=os&infra=stock error was

    yum -y install gcc 时候报bug: Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=7& ...

  6. Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=7&arch=x86_64&repo=os&infra=stoc

    今天在使用yum安装文件时,出现了以下问题: root@localhost opt]# yum update Loaded plugins: fastestmirror Could not retri ...

  7. 安装时遇到:正在尝试其它镜像。 http://mirrors.btte.net/centos/7.2.1511/extras/x86_64/repodata/repomd.xml: [Errno 14] curl#6 - "Could not resolve host: mirrors.btte.net; 未知的错误"

    我出现这种错误是因为网络链接问题,因为我设置虚拟机网络链接为VmNET8,设置了nat模式,使得我本地机可以访问虚拟机的linux服务器.但是打开虚拟机的浏览器却不能上网了.所以现在我用xshell装 ...

  8. 14: curl#6 - "Could not resolve host: mirrorlist.centos.org; 未知的错误"

    14: curl#6 - "Could not resolve host: mirrorlist.centos.org; 未知的错误" One of the configured ...

  9. yum安装软件报错:curl#6 - "Could not resolve host: mirrorlist.centos.org; Temporary failure in name resolut

    # yum install -y epel-release Loaded plugins: fastestmirror Repository base is listed more than once ...

  10. 内核升级在线安装报错:Could not retrieve mirrorlist http://mirrors.elrepo.org/mirrors-elrepo-kernel.el7 error was14: curl#6 - "Could not resolve host: mirrors.elrepo.org; 未知的错误"

    修改网卡配置 [root@localhost ~]# vim /etc/sysconfig/network-scripts/ifcfg-ens32 BOOTPROTO="none" ...

随机推荐

  1. NOIP模拟62

    T1 Set 解题思路 抽屉原理 发现对于前缀和向 \(n\) 取模之后一定是右两个值相等的(包括什么都不选的 0 ). 假设 \(pre_j=pre_i\) 那么 \([j+1,i]\) 之间这一段 ...

  2. Redisson 限流器源码分析

    Redisson 限流器源码分析 对上篇文章网友评论给出问题进行解答:redis 的key 是否会过期 可以先阅读上篇文章: redis + AOP + 自定义注解实现接口限流 - 古渡蓝按 - 博客 ...

  3. CSP-S2023 题解

    CSP-S 2023 题解 密码锁 发现总状态数只有 \(10^5\) 个,枚举 \(O(n)\) 暴力判断即可,复杂度 \(O(10^5 n)\). 或者每一个状态只对应了 \(81\) 个状态,枚 ...

  4. vs code 中开发 .net5 mvc

    asp.net core mvc ------------ 安装vscode-solution-explorer,C# 2个扩展.遇到yes就点yes. 新建一个文件夹:D:\repos\Net5Mv ...

  5. 一文带你搞清楚Python的多线程和多进程

    本文分享自华为云社区<Python中的多线程与多进程编程大全[python指南]>,作者:柠檬味拥抱. Python作为一种高级编程语言,提供了多种并发编程的方式,其中多线程与多进程是最常 ...

  6. mysql 联合表查询从表即使有索引依然ALL的一个原因-索引ALL解决,字符编码方式不一致导致全表搜索

    mysql 联合表查询从表即使有索引依然ALL的一个原因-索引ALL解决,字符编码方式不一致导致全表搜索那就是主表和从表的关联字段的编码方式不一样!!! 产生的现象: 解决之后,正确的使用了t2.or ...

  7. maven依赖关系及打包及阿里云仓库地址

    https://developer.aliyun.com/mvn/search 阿里云仓库地址,可以搜索 <repositories> <repository> <id& ...

  8. HTTP事务理解

    借图: 首先三次握手理解: TCP三次握手好比两个对话, 第一次握手:甲给乙一直发送信息,乙没有回应,甲不知道乙有没有收到信息 第二次握手:乙收到信息,然后再给甲回信息,此时甲知道乙收到信息,但乙不知 ...

  9. C#winform软件移植上linux的秘密,用GTK开发System.Windows.Forms

    国产系统大势所趋,如果你公司的winform界面软件需要在linux上运行,如果软件是用C#开发的,现在我有一个好的快速解决方案. 世界第一的微软的Microsoft Visual Studio,确实 ...

  10. 【RocketMQ 系列】 RocketMQ 双主双从(同步双写) 集群搭建

    1. 各角色介绍 Producer:消息的发送者:举例:发信者 Consumer:消息接收者:举例:收信者 Broker:暂存和传输信息:举例:邮局 NameServer:管理Broker:举例:各个 ...