Yum repository error with CentOS 6 minimal install

General support questions

Yum repository error with CentOS 6 minimal install

Postby AkosPrime » 2012/02/06 19:52:18

Hello,

I have 3 systems that I installed using the "minimal" install option, and a fourth with just about everything. The 3 systems with the minimal install cannot seem to use yum correctly. My systems are not behind a proxy firewall, and are network accessible via SSH. However because of the minimal install, and the broken yum, I don't have any tools on the systems (ssh, ftp, telnet, traceroute, wget, http, etc.) to test outbound connections except for ping, also because the openssh-clients package is not installed I am unable to scp any packages, binaries, or tarballs to the system to attempt to manually fix this. The problem does not appear on the 4th system which is able to do everything just fine.

Here is the yum message on the 3 minimal install systems:

Code: Select all
# yum update
Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=6&arch=x86_64&repo=os error was
14: PYCURL ERROR 6 - ""
Error: Cannot retrieve repository metadata (repomd.xml) for repository: base. Please verify its path and try again


Here it is trying to disable plugins and only enable base repos:
Code: Select all
# yum --noplugins --disablerepo * --enablerepo base,updates,extras update

Error getting repository data for CentOS-Base.repo, repository not found


Here is some general information that frequently seems to be requested:
Code: Select all
# cat /etc/redhat-release
CentOS Linux release 6.0 (Final)

# uname -r
2.6.32-71.el6.x86_64

# ls -l /etc/yum.repos.d
total 12
-rw-r--r--. 1 root root 1926 Feb  6 14:30 CentOS-Base.repo
-rw-r--r--. 1 root root  637 Jul  2  2011 CentOS-Debuginfo.repo
-rw-r--r--. 1 root root  626 Jul  2  2011 CentOS-Media.repo

# cat /etc/yum.repos.d/CentOS-Base.repo

# CentOS-Base.repo
#
# The mirror system uses the connecting IP address of the client and the
# update status of each mirror to pick mirrors that are updated to and
# geographically close to the client.  You should use this for CentOS updates
# unless you are manually picking other mirrors.
#
# If the mirrorlist= does not work for you, as a fall back you can try the
# remarked out baseurl= line instead.
#
#

[base]
name=CentOS-$releasever - Base
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os
#baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6

#released updates
[updates]
name=CentOS-$releasever - Updates
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates
#baseurl=http://mirror.centos.org/centos/$releasever/updates/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6

#additional packages that may be useful
[extras]
name=CentOS-$releasever - Extras
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras
#baseurl=http://mirror.centos.org/centos/$releasever/extras/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6

#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-$releasever - Plus
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus
#baseurl=http://mirror.centos.org/centos/$releasever/centosplus/$basearch/
gpgcheck=1
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6

#contrib - packages by Centos Users
[contrib]
name=CentOS-$releasever - Contrib
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=contrib
#baseurl=http://mirror.centos.org/centos/$releasever/contrib/$basearch/
gpgcheck=1
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6


Finally here is the results from 'getinfo.sh packages' since this also seems to be frequently requested:

Code: Select all
== BEGIN uname -rmi ==
2.6.32-71.el6.x86_64 x86_64 x86_64
== END   uname -rmi ==

== BEGIN rpm -qa \*-release\* ==
centos-release-6-0.el6.centos.5.x86_64
== END   rpm -qa \*-release\* ==

== BEGIN cat /etc/redhat-release ==
CentOS Linux release 6.0 (Final)
== END   cat /etc/redhat-release ==

== BEGIN getenforce ==
Permissive
== END   getenforce ==

== BEGIN free -m ==
             total       used       free     shared    buffers     cached
Mem:          3962        307       3654          0         68         57
-/+ buffers/cache:        181       3781
Swap:        16383          0      16383
== END   free -m ==

== BEGIN rpm -qa yum\* rpm-\* python | sort ==
python-2.6.5-3.el6.x86_64
rpm-libs-4.8.0-12.el6.x86_64
rpm-python-4.8.0-12.el6.x86_64
yum-3.2.27-14.el6.centos.noarch
yum-metadata-parser-1.1.2-14.1.el6.x86_64
yum-plugin-fastestmirror-1.1.26-11.el6.noarch
== END   rpm -qa yum\* rpm-\* python | sort ==

== BEGIN ls /etc/yum.repos.d ==
CentOS-Base.repo
CentOS-Debuginfo.repo
CentOS-Media.repo
== END   ls /etc/yum.repos.d ==

== BEGIN cat /etc/yum.conf ==
[main]
cachedir=/var/cache/yum/$basearch/$releasever
keepcache=0
debuglevel=2
logfile=/var/log/yum.log
exactarch=1
obsoletes=1
gpgcheck=1
plugins=1
installonly_limit=5
bugtracker_url=http://bugs.centos.org/set_project.php?project_id=16&ref=http://bugs.centos.org/bug_report_page.php?category=yum
distroverpkg=centos-release

#  This is the default, if you make this bigger yum won't see if the metadata
# is newer on the remote and so you'll "gain" the bandwidth of not having to
# download the new metadata and "pay" for it by yum not having correct
# information.
#  It is esp. important, to have correct metadata, for distributions like
# Fedora which don't keep old packages around. If you don't like this checking
# interupting your command line usage, it's much better to have something
# manually check the metadata once an hour (yum-updatesd will do this).
# metadata_expire=90m

# PUT YOUR REPOS HERE OR IN separate files named file.repo
# in /etc/yum.repos.d
== END   cat /etc/yum.conf ==

== BEGIN yum repolist all ==
Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=6&arch=x86_64&repo=os error was
14: PYCURL ERROR 6 - ""
repo id                       repo name                               status
base                          CentOS-6 - Base                         enabled: 0
c6-media                      CentOS-6 - Media                        disabled
centosplus                    CentOS-6 - Plus                         disabled
contrib                       CentOS-6 - Contrib                      disabled
debug                         CentOS-6 - Debuginfo                    disabled
extras                        CentOS-6 - Extras                       enabled: 0
updates                       CentOS-6 - Updates                      enabled: 0
repolist: 0
== END   yum repolist all ==

== BEGIN egrep 'include|exclude' /etc/yum.repos.d/*.repo ==
== END   egrep 'include|exclude' /etc/yum.repos.d/*.repo ==

== BEGIN sed -n -e "/^\[/h; /priority *=/{ G; s/\n/ /; s/ity=/ity = /; p }" /etc/yum.repos.d/*.repo | sort -k3n ==
== END   sed -n -e "/^\[/h; /priority *=/{ G; s/\n/ /; s/ity=/ity = /; p }" /etc/yum.repos.d/*.repo | sort -k3n ==

== BEGIN rpm -qa kernel\* | sort ==
kernel-2.6.32-71.el6.x86_64
kernel-firmware-2.6.32-71.el6.noarch
== END   rpm -qa kernel\* | sort ==

AkosPrime
 
Posts: 18
Joined: 2006/01/07 17:51:29

Re: Yum repository error with CentOS 6 minimal install

Postby pschaff » 2012/02/06 20:52:03

First, you should not be installing CentOS-6.0. The current and supported release is CentOS 6.2.

It seems your minimals installs are a bit too minimal. You can use DVD media mounted on one of the mountpoints in /etc/yum.repos.d/CentOS-Media.repo with
Code: Select all
yum --disablerepo \* --enablerepo c6-media install ...
to add packages.

See also:
CentOS-6 FAQ #2. Why does my Ethernet not work unless I log in and explicitly enable it?
pschaff
Retired Moderator
 
Posts: 18277
Joined: 2006/12/13 20:15:34
Location: Tidewater, Virginia, North America

Re: Yum repository error with CentOS 6 minimal install

Postby AkosPrime » 2012/02/10 12:35:24

Okay the 6.2 install of a minimal system doesn't have this problem. Although it did introduce a new one on certain hardware, which I'll be opening a separate thread to discuss.
AkosPrime
 
Posts: 18
Joined: 2006/01/07 17:51:29


Return to CentOS 6 - General Support

Who is online

Users browsing this forum: No registered users and 7 guests