Find the answer to your Linux question:
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 ...
  1. #1
    Just 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

  2. #2
    Linux Guru waterhead's Avatar
    Join Date
    Jul 2004
    Location
    Franklin, Wisconsin
    Posts
    4,577
    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.
    Code:
    yum install creraterepo
    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:
    createrepo /rpms
    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.


    Here is a simple file, that you can save as localrpms.repo.
    Code:
    [localrpms]
    name=localrpms
    baseurl=file:///rpms
    enabled=1
    gpgcheck=0
    Next update YUM using this ccommand.
    Code:
     yum makecache
    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.
    Paul

    Please do not send Private Messages to me with requests for help. I will not reply.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...