linux yum安装报错:http://people.centos.org/tru/devtools-2/7/x86_64/RPMS/repodata/repomd.xml

报错

在这里插入图片描述

已加载插件:fastestmirror, security
设置安装进程
Repository fasttrack is listed more than once in the configuration
Loading mirror speeds from cached hostfile
 * c6-media: 
 * epel: mirror.nju.edu.cn
 * nux-dextop: li.nux.ro
http://people.centos.org/tru/devtools-2/6/x86_64/RPMS/repodata/repomd.xml: [Errno 14] Peer cert cannot be verified or peer cert invalid
尝试其他镜像。
It was impossible to connect to the Red Hat servers.
This could mean a connectivity issue in your environment, such as the requirement to configure a proxy,
or a transparent proxy that tampers with TLS security, or an incorrect system clock.
Please collect information about the specific failure that occurs in your environment,
using the instructions in: https://access.redhat.com/solutions/1527033 and open a ticket with Red Hat Support.

错误:Cannot retrieve repository metadata (repomd.xml) for repository: testing-devtools-2-centos-6. Please verify its path and try again
You have new mail.                                  

解决方案

1、进入yum源目录

cd /etc/yum.repos.d

2、cat查看,发现有对应的网址信息

cat devtools-2.repo 
[testing-devtools-2-centos-$releasever]
name=testing 2 devtools for CentOS $releasever 
baseurl=http://people.centos.org/tru/devtools-2/$releasever/$basearch/RPMS
gpgcheck=0

3、修改文件名称

mv devtools-2.repo devtools-2.repo.bak  
当你在Linux系统上使用yum工具安装软件包时,遇到"Could not retrieve mirrorlist http://mirrorlist.centos.org"这样的错误,通常意味着yum无法从CentOS官方镜像列表获取可用的软件包源。这可能是由于以下几个原因: 1. **网络连接问题**:检查你的网络是否稳定,或者尝试重启路由器、清空DNS缓存。 2. **镜像站点不可达**:CentOS镜像地址可能暂时无法访问,你可以更换到其他的镜像源,比如国内的阿里云、清华大学等提供的镜像。 3. **防火墙限制**:确认系统防火墙或安全软件是否阻止了对特定网址的访问,如有需要,可以临时关闭或者添加规则允许访问。 4. **yum配置文件问题**:检查`/etc/yum.conf` 或者 `/etc/yum.repos.d/` 中的mirrors设置,看是否有正确的URL。 5. **时间同步问题**:确保系统的日期和时间与互联网的时间保持一致,因为一些服务器可能会基于时间戳验证请求。 解决这个问题的一个通用步骤是编辑yum的配置文件,更新或添加一个有效的镜像源。例如: ```bash sudo vi /etc/yum.repos.d/CentOS-Mirrors.list ``` 然后替换原有的镜像URL为可用的镜像,如: ``` [base] name=CentOS-$releasever - Base mirrorlist=https://mirrors.aliyun.com/repo/CentOS-\$releasever/$basearch/ enabled=1 gpgcheck=1 ``` 保存并关闭文件后,运行命令让yum更新新的配置: ```bash sudo yum makecache fast ``` 接着再次尝试安装软件包: ```bash sudo yum install [package-name] ```
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值