'yum install createrepo' issue

Hi, Here is the issue:

# yum install createrepo
Warning, could not load sqlite, falling back to pickle
Setting up Install Process
Setting up repositories
file://var/yum_rpm/repodata/repomd.xml: [Errno 5] OSError: [Errno 2] No such file or directory: '/yum_rpm/repodata/repomd.xml'
Trying other mirror.
Cannot open/read repomd.xml file for repository: myrepo
failure: repodata/repomd.xml from myrepo: [Errno 256] No more mirrors to try.
Error: failure: repodata/repomd.xml from myrepo: [Errno 256] No more mirrors to try.

# cat /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
bugtracker_url=http://bugs.centos.org/yum5bug
# Note: yum-RHN-plugin doesn't honor this.
metadata_expire=1800
installonly_limit = 5
[myrepo]
name=RHEL 4 $releasever - $basearch
baseurl=file://var/yum_rpm
enabled=1

# cat /etc/yum.repos.d/rhel-debuginfo.repo
[rhel-debuginfo]
name=Red Hat Enterprise Linux $releasever - $basearch - Debug
baseurl=ftp://ftp.redhat.com/pub/redhat/linux/enterprise/$releasever/en/os/$basearch/Debuginfo/
enabled=0
gpgcheck=1
#gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release

# ls -l /var/yum_rpm/*.rpm | wc -l
1583

Please help! Thank you all the time!

---------- Post updated at 11:39 AM ---------- Previous update was at 10:37 AM ----------

I've changed the baseurl, but got the same result:

# grep baseurl /etc/yum.conf
baseurl=ftp://ftp.redhat.com/pub/redhat/linux/enterprise/4/en/os/i386/Debuginfo/

# yum install createrepo
Warning, could not load sqlite, falling back to pickle
Setting up Install Process
Setting up repositories
ftp://ftp.redhat.com/pub/redhat/linux/enterprise/4/en/os/i386/Debuginfo/repodata/repomd.xml: [Errno 4] IOError: [Errno ftp error] 550 Failed to change directory.
Trying other mirror.
Cannot open/read repomd.xml file for repository: myrepo
failure: repodata/repomd.xml from myrepo: [Errno 256] No more mirrors to try.
Error: failure: repodata/repomd.xml from myrepo: [Errno 256] No more mirrors to try.

In the 1st case, you might have copied only the .rpm files from the installation media and not the repomd.xml file that actually contains information about the repository and dependencies etc. To create this file, you need to have the createrepo command installed (you have to use the rpm command and have to install the dependencies manually though. But that's worth it). Post that, you should be able to use your local repository.

In the 2nd case, it's not an error from the yum's end. I have tested this with ftp client and you cannot get past the debuginfo directory without passive mode.

1 Like

Thank you much for the helpful info!

I've decided to use the old tool up2date instead of yum since the systems need to patch are RHEL 4.

I've found that I still need to solve this issue.

Here is some new stuff:

How can I create repomd.xml file by using createrepo?

Thank you!

You have to try with full path name, one of these:

createrepo `pwd`
createrepo /var/var_rpm
1 Like

Tried but didn't work either. Thanks.

---------- Post updated at 03:34 PM ---------- Previous update was at 03:08 PM ----------

My mistake: In /etc/yum.conf
baseurl=file://var/yum_rpm should be
baseurl=file:///var/yum_rpm

Thanks.