Archives

2008 (214)
2007 (280)
2006 (348)
2005 (65)
2004 (8)
2003 (16)
2002 (14)

Search

Type in this box and hit “enter” to search through all titles, content, authors, along with tags on bookmarks, photos, etc.

Searches for words which bring up more than half of all entries are ignored.

Tags

Top 30 tags I’ve added to blog posts and bookmarks.

beograd (15)
car (15)
code (52)
españa (24)
food (20)
geek (72)
holiday (17)
java (18)
kingsland (19)
kingsland road (23)
language (15)
london (257)
madrid (16)
madrid march 2007 (16)
madríd (16)
olympic (15)
olympic torch (15)
olympic torch relay (15)
philosophy (28)
php (16)
programming (19)
railway (15)
road (24)
serbia (18)
shoreditch (70)
spain (24)
station (16)
street (47)
torch relay (15)
web (15)

About me

For the last decade and more, my fascination with taking things apart and putting them back together again has manifested itself in my habitual making, using and working with Internet stuff.

In addition to providing me with a soapbox, this site tracks what I’m up to online using feeds from Flickr, del.icio.us and others.

View my profile on LinkedIn

.

Regular reads

Sunday, July 13, 2008

Onglet

Onglet
There was a seriously cadaverous feel to this onglet I had from the usual place last week. Something about the texture, the sinewy, raw viscerality of it, spoke to me of torture, death and decay. Bloody tasty, though.
Setting up “yum” on RedHat Enterprise Linux

I just found myself in the situation of needing to install a load of software on a RHEL 4 box which had not had up2date set up. “Simple,” I thought, “it’s RPM-based, so just install yum and all will be well. yum’s nicer than up2date anyway, so”.

A cursory Google threw up this guide to doing just that, but I found that the list of RPMs provided was incomplete, possibly due to the age of the article. With the duplicates removed, package versions matched, and downloads sourced from the up-to-date CentOS and pbone, the set now installed without dependency problems, but left a non-functioning yum installation:

Setting up Install Process
Setting up repositories
not using ftp, http[s], or file for repos, skipping - Null is not a valid release or hasnt been released yet
Cannot find a valid baseurl for repo: update
Error: Cannot find a valid baseurl for repo: update

I hadn’t delved into yum’s config or repository setup much before, as on most non-RHEL rpm-based distributions it tends to work out of the box; I’d added other repositories, notably Dag Wieers’, but not looked at the format much. Imagine my delight on realising that now was my chance.

A first glance at the repository definition in /etc/yum.repos.d/CentOS-Base.repo suggested trying to use the baseurl entry which is commented out by default, rather than the mirrorlist. No joy, but it gave a pretty obvious clue:

http://mirror.centos.org/centos/Null/os/i386/repodata/repomd.xml: [Errno 14] HTTP Error 404: Not Found
Trying other mirror.
Cannot open/read repomd.xml file for repository: update
failure: repodata/repomd.xml: from update: [Errno 256] No more mirrors to try.
Error: failure: repodata/repomd.xml: from update: [Errno 256] No more mirrors to try.

Got it? That nasty Null is caused because the repository definition file uses a variable $releasever which, as man 5 yum.conf tells us, is taken from the currently installed version of the package named as distroverpkg in /etc/yum.conf - which by default is centos-release (presumably taken from the RHEL redhat-release convention). Thus the only step necessary to get it working was to install the centos-release package. The baseurl entry in the repository definition could be commented out again.

So here, for your edification, and as an »aide-memoire« for me, is my list of the packages required to get yum working correctly on RHEL4:

centos-release
centos-yumconf
python-elementtree
python-sqlite
python-urlgrabber
sqlite
yum
yum-metadata-parser

Joy.

Enthusiast

Enthusiast
Parked up outside a Yamaha motorbike shop on Shoreditch High Street.

Shoreditch, London