CentOS 6.8 Yum安装Screen 提示Error: Cannot retrieve repository metadata (repomd.xml) for repository

CentOS 7.8 用Yum源安装Screen 时报如下错误:


[root@heheda]# yum install screen
Loaded plugins: fastestmirror
Setting up Install Process
Loading mirror speeds from cached hostfile
Could not retrieve mirrorlist http://apt.sw.be/redhat/el6/en/mirrors-rpmforge error was
14: PYCURL ERROR 22 - "The requested URL returned error: 404 Not Found"
 * base: mirrors.aliyuncs.com
 * epel: mirrors.aliyuncs.com
 * extras: mirrors.aliyuncs.com
 * updates: mirrors.aliyuncs.com
http://apt.sw.be/redhat/el6/en/x86_64/rpmforge/repodata/repomd.xml: [Errno 14] PYCURL ERROR 22 - "The requested URL returned error:          404 Not Found"
Trying other mirror.
To address this issue please refer to the below knowledge base article

https://access.redhat.com/articles/1320623

If above article doesn't help to resolve this issue please open a ticket with Red Hat Support.

Error: Cannot retrieve repository metadata (repomd.xml) for repository: rpmforge. Please verify its path and try again

据分析错误原因是因为源地址变化导致的错误,那么可以替换源地址来修复该问题
用root用户登陆后cd到/etc/yum.repos.d/该目录下
寻找 rpmforge.repo该文件,
该文件大致内容如下


### Name: RPMforge RPM Repository for RHEL 6 - dag
### URL: http://rpmforge.net/
[rpmforge]
name = RHEL $releasever - RPMforge.net - dag
baseurl = http://apt.sw.be/redhat/el6/en/$basearch/rpmforge
mirrorlist = http://apt.sw.be/redhat/el6/en/mirrors-rpmforge
#mirrorlist = file:///etc/yum.repos.d/mirrors-rpmforge
enabled = 1
protect = 0
gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rpmforge-dag
gpgcheck = 1

[rpmforge-extras]
name = RHEL $releasever - RPMforge.net - extras
baseurl = http://apt.sw.be/redhat/el6/en/$basearch/extras
mirrorlist = http://apt.sw.be/redhat/el6/en/mirrors-rpmforge-extras
#mirrorlist = file:///etc/yum.repos.d/mirrors-rpmforge-extras
enabled = 0
protect = 0
gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rpmforge-dag
gpgcheck = 1

[rpmforge-testing]
name = RHEL $releasever - RPMforge.net - testing
baseurl = http://apt.sw.be/redhat/el6/en/$basearch/testing
mirrorlist = http://apt.sw.be/redhat/el6/en/mirrors-rpmforge-testing
#mirrorlist = file:///etc/yum.repos.d/mirrors-rpmforge-testing
enabled = 0
protect = 0
gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rpmforge-dag
gpgcheck = 1

寻找修改该文件的baseurl值,将其修改为

baseurl = baseurl=http://centos.ustc.edu.cn/centos/5/os/i386/

保存后执行命令

# yum clean all

然后执行

# yum install screen

提示安装成功


[root@heheda]# yum install screen
Loaded plugins: fastestmirror
Setting up Install Process
Repository 'rpmforge': Error parsing config: Error parsing "baseurl = 'baseurl=http://centos.ustc.edu.cn/centos/5/os/i386/'": URL mu         st be http, ftp, file or https not ""
Repository 'rpmforge-extras': Error parsing config: Error parsing "baseurl = 'baseurl=http://centos.ustc.edu.cn/centos/5/os/i386/'":          URL must be http, ftp, file or https not ""
Repository 'rpmforge-testing': Error parsing config: Error parsing "baseurl = 'baseurl=http://centos.ustc.edu.cn/centos/5/os/i386/'"         : URL must be http, ftp, file or https not ""
Determining fastest mirrors
 * base: mirrors.aliyuncs.com
 * epel: mirrors.aliyuncs.com
 * extras: mirrors.aliyuncs.com
 * updates: mirrors.aliyuncs.com
base
base/primary_db
epel
epel/primary_db
extras
extras/primary_db
updates
updates/primary_db
Resolving Dependencies
--> Running transaction check
---> Package screen.x86_64 0:4.0.3-19.el6 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================
 Package                       Arch                          Version
================================================================================
Installing:
 screen                        x86_64                        4.0.3-19.el6

Transaction Summary
================================================================================
Install       1 Package(s)

Total download size: 494 k
Installed size: 795 k
Is this ok [y/N]: y
Downloading Packages:
screen-4.0.3-19.el6.x86_64.rpm
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Warning: RPMDB altered outside of yum.
  Installing : screen-4.0.3-19.el6.x86_64
  Verifying  : screen-4.0.3-19.el6.x86_64

Installed:
  screen.x86_64 0:4.0.3-19.el6

Complete!

提示安装成功

3,041次点击 CentOS 6.8 Yum安装Screen 提示Error: Cannot retrieve repository metadata (repomd.xml) for repository已关闭评论
0 thoughts on “CentOS 6.8 Yum安装Screen 提示Error: Cannot retrieve repository metadata (repomd.xml) for repository
添加一条新回复 回到顶部

亲爱的,主人已经关闭了这篇文章的评论 。