Questions about Yum not being used

Source: Internet
Author: User



1 If you are using a local Yum Source: The following occurs:

[Email protected] ~]# yum-y install xen*
Error:cannot Retrieve repository metadata (Repomd.xml) for repository:base. Verify its path and try again
Solve:

1 See if there are repomd.xml files in the Yum repository, and whether Yum clean all last results

2 See if there is an error in the Yum configuration file

Ensure gpgcheck=0



========================================================

If you are using a network Yum Source:

1 to ensure that the function of the Internet, the domain name can be resolved
2 suspect is a network problem, repomd.xml file download not down, but use wget can download.
It may be that Yum has its own proxy setup problem and cancels it out.
[Email protected] ~]# vim /etc/yum.conf
[Main]
Cachedir=/var/cache/yum
Keepcache=0
debuglevel=2
Logfile=/var/log/yum.log
Distroverpkg=redhat-release
Tolerant=1
Exactarch=1
Obsoletes=1
Gpgcheck=1
Plugins=1
# Note:yum-rhn-plugin doesn ' t honor this.
metadata_expire=1h
# Default.
# installonly_limit = 3
# PUT YOUR REPOS here OR in separate files named File.repo
# IN/ETC/YUM.REPOS.D

#The Proxy Server address
#proxy =http://10.10.44.251:6588
  This agent can not be on the net, cause repomd.xml download not down, cancel out; To set up a Yum proxy here
(2) The following error occurred after the installation of the modification
[Email protected] yum.repos.d]# yum-y install Virt-manager
Base 100% |=========================| 1.1 KB 00:00
primary.xml.gz 100% |=========================| 1.1 MB 00:00
Base: ################################################## 3222/3222
Updates 100% |=========================| 1.1 KB 00:00
primary.xml.gz 100% |=========================| 1.1 MB 00:00
Updates: ################################################## 3222/3222
file:///media/CentOS/repodata/repomd.xml: [Errno 5] OSError: [Errno 2] No file or directory: '/media/centos/repodata/repomd.xml '
Trying other mirror.
File:///media/cdrecorder/repodata/repomd.xml: [Errno 5] OSError: [Errno 2] No file or directory: '/media/cdrecorder/repodata/ Repomd.xml '
Trying other mirror.
File:///media/cdrom/repodata/repomd.xml: [Errno 5] OSError: [Errno 2] No file or directory: '/media/cdrom/repodata/repomd.xml '
Trying other mirror.
Error:cannot Retrieve repository metadata (Repomd.xml) for Repository:c5-media. Verify its path and try again

This is/ETC/YUM.REPOS.D/centos-media.repo in mischief, erased, or renamed

[Email protected] yum.repos.d]# CD/ETC/YUM.REPOS.D
[Email protected] yum.repos.d]# MV Centos-media.repo Centos-media.repo.bak

(3) The package version found when installing the relevant package with Yum does not correspond, for example, installing Virt-manager under CentOS 5.2, always prompting that the corresponding package cannot be downloaded at Yum source.

The error is as follows:

Downloading Packages:
HTTP://10.10.104.86:8080/CENTOS/5.2/CENTOS/LIBVIRT-PYTHON-0.6.3-20.EL5.X86_64.RPM: [Errno] HTTP Error 404:not Found
Trying other mirror.
HTTP://10.10.104.86:8080/CENTOS/5.2/CENTOS/KERNEL-XEN-2.6.18-164.EL5.X86_64.RPM: [Errno] HTTP Error 404:not Found

Cause Analysis:

Search for the package kernel-xen under cent OS 5.2 and discover that the version is kernel-xen-2.6.18-92.el5.x86_64.rpm. And here is the hint is download kernel-xen-2.6.18-164.el5.x86_64.rpm failure, the two do not correspond.

This means that although the source of the Yum is configured for the CentOS 5.2 image, the download is actually a different version when using Yum installation.

Look at the/etc/yum.conf file, there are Cachedir=/var/cache/yum entries, this is the Yum cache, I think is not the reason for the cache, so delete all files under/var/cache/yum, re-use yum install installation, success.

After thinking, finally understand the reason, before I due to misoperation, the Yum source is configured as a source of CentOS 5.4, and do the same installation, so there will be a cache, the next time, even if the new Yum source configuration, yum find the package depends on the first to find from the cache, not found in the source search, This causes the download to be 5.4 under version kernel-xen-2.6.18-164.el5.x86_64.rpm.


(4) When Yum installs, GPG key retrieval failed: [Errno] HTTP error 404:not Found error

Command followed by the--nogpgcheck option




Questions about Yum not being used

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.