Results 1 to 2 of 2
Hi,
I installed yum packages and tried to use it like yum install <package>.rpm. I am getting the following errors. how to rectify this.
thanks
harsha
----------------------------------------------------------
Loading "installonlyn" plugin
...
- 07-31-2009 #1Just Joined!
- Join Date
- Jun 2009
- Posts
- 7
Yum error
Hi,
I installed yum packages and tried to use it like yum install <package>.rpm. I am getting the following errors. how to rectify this.
thanks
harsha
----------------------------------------------------------
Loading "installonlyn" plugin
Loading "rhnplugin" plugin
This system is not registered with RHN.
RHN support will be disabled.
Setting up Install Process
Setting up repositories
file:///rpms/repodata/repomd.xml: [Errno 5] OSError: [Errno 2] No such file or directory: '/rpms/repodata/repomd.xml'
Trying other mirror.
Error: Cannot open/read repomd.xml file for repository: rhel-debuginfo
Yum configuration file.
---------------------------
[rhel-debuginfo]
name=Red Hat Enterprise Linux $releasever - $basearch - Debug
baseurl=file:///rpms
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
- 08-01-2009 #2
To use a local directory with YUM, you first must create the repo data using createrepo. If createrepo isn't already installed, you should be able to install it using YUM.
You then must use it to create the datafile. if the rpms are in the /rpms folder, use this command. (Run this and all others with root permissions)Code:yum install creraterepo
This will create a folder named repodata, in the /rpms folder, containing the needed files. You then need to create a config file for your new repo in the /etc/yum.repos.d/ folder. It looks like you already did, but you used an existing file and altered it. I would recommend just creating a new one and restore the one you changed to it's original configuration.Code:createrepo /rpms
Here is a simple file, that you can save as localrpms.repo.
Next update YUM using this ccommand.Code:[localrpms] name=localrpms baseurl=file:///rpms enabled=1 gpgcheck=0
It now should include any rpm files that you have in the /rpms folder. When I added rpms to my folder, I re-ran the createrepo and makecache commands.Code:yum makecache
Paul
Please do not send Private Messages to me with requests for help. I will not reply.


Reply With Quote