首页 > 系统相关 >Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=7&arch=x86_64&repo=os&infra=stoc

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

时间:2024-07-21 16:42:22浏览次数:19  
标签:repository centos Could repo mirrorlist yum release

报错信息

    │               (SSH client, X server and network tools)               │
    │                                                                      │
    │ ⮞ SSH session to [email protected]                                │
    │   • 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; 未知的错误"

标签:repository,centos,Could,repo,mirrorlist,yum,release
From: https://www.cnblogs.com/guixiangyyds/p/18314625/wenti1

相关文章

  • Centos7出现问题Cannot find a valid baseurl for repo: base/7/x86_64
    问题现象:在操作yuminstallhttpd报错Centos7下yum安装报错:Cannotfindavalidbaseurlforrepo:base/7/x86_64报错原因:1、检查网络ping2、检查DNS解析nslookip会发现能ping通,DNS解析正常!3、yum源有问题!解决:循环破除下载国内yum源配置文件到/etc/yum.re......
  • centos 防火墙配置,并限制端口
    查看防火墙状态systemctlstatusfirewalld如果防火墙处于停止状态,则启动它:systemctlstartfirewalld并设置防火墙开机自启:systemctlenablefirewalld查看当前开放的端口firewall-cmd--list-ports开放端口firewall-cmd--add-port=80/tcp--permanentfirewall......
  • 虚拟机centos9搭建wordpress
    利用nginx和MariaDB搭建wordpress 1.更换yum源更新系统软件包:1.1备份yum源1.1.1创建备份目录:创建一个目录来保存备份的仓库配置文件:sudomkdir-p/etc/yum.repos.d/backup1.1.2移动现有仓库配置文件到备份目录:将/etc/yum.repos.d/目录中的所有文件移动到备份......
  • Linux安装 JDK (CentOS 7)
    Linux安装JDK一、Linux安装软件的方式第一种:二进制发布包安装:软件已经针对具体平台编译打包发布,只要解压,修改配置即可第二种:rpm安装:软件已经按照redhat的包管理规范进行打包,使用rpm命令进行安装,不能自行解决库依赖问题......
  • openFeign调用问题:required a bean of type 'xxx' that could not be found.
    场景:服务B是一个公共的服务,打包成jar后给其他服务使用packagecom.testB.seviceB.remote;//服务B中定义的feign接口@FeignClient(value="service-c",path="/service-c")publicinterfaceServiceBClient{xxxx} 服务A中引用服务B中定义的Feign接口package......
  • 解决Could not find artifact jdk.tools:jdk.tools:jar:1.8 at specified
    报错详细信息Failedtoexecutegoalorg.apache.maven.plugins:maven-dependency-plugin:3.1.1:tree(default-cli)onprojectspringbootbd-product:Cannotbuildprojectdependencygraph:Couldnotresolvenorcollectfollowingdependencies:[jdk.tools:jdk.tools:ja......
  • CentOS6.5yum安装Python3⛱️
    CentOS6.5yum安装Python3⛱️ 1.在CentOS6.5上通过Webtatic仓库安装Python3[root@localhost~]#rpm-Uvhhttps://mirror.webtatic.com/yum/el6/latest.rpm[root@localhost~]#yum-yinstallpython34upython34u-devel2.安装pip[root@localhost~]#yum-yi......
  • 在Linux(CentOS、Ubuntu等等)中安装Erlang和Elixir
    检查旧版本$uname-aLinuxws-ersyia-05.4.241-1-tlinux4-0017.10#1SMPWedMay817:01:03CST2024x86_64x86_64x86_64GNU/Linux➜/workspaceelixir--versionErlang/OTP24[erts-12.3.2.17][source][64-bit][smp:8:2][ds:8:2:10][async-threads:1][jit]......
  • 20240719-CentOS7 ftp服务器搭建与xftp连接
    在CentOS7上搭建ftp服务器,可以使用vsftpd守护进程。安装vsftpd:sudoyuminstall-yvsftpd启动并使vsftpd开机自启:sudosystemctlstartvsftpdsudosystemctlenablevsftpd配置vsftpd编辑配置文件/etc/vsftpd/vsftpd.conf,根据需要修改如下配置:anonymous_enable=NO#禁用......
  • centos6忘记root密码,进入单用户修改
    1、开机按任意键进入启动菜单,如下2、按a或e进入grub界面3、选中内核按e进入内核编辑模式4、输入1或者是S或者s或者single,然后按enter回车键5、按enter回到启动菜单后,按b进入系统6、进入系统后,输入passwd修改密码......