This is what I get

$ sudo yum install git-core
file://localhost/tmp/common1/x86_64/redhat/50/base/ga/Server/repodata/repomd.xml: [Errno 5] OSError: [Errno 2] No such file or directory: '/tmp/common1/x86_64/redhat/50/base/ga/Server/repodata/repomd.xml'
Trying other mirror.
Setting up Install Process
No package git-core available.
Nothing to do

What is wrong here?

Update: Current State of the configuration files:

$ cat /etc/yum.conf

name=Red Hat Linux - Base

$ ls /etc/yum.repos.d/
  • Hmm if you cannot install anything then the settings are wrong. I'd go with pbm's answer.
    – phunehehe
    Commented Nov 15, 2010 at 0:36
  • Deleted my last comment, missed info in your edit. Anyway NJ's answer is correct. If something in the answer isnt working you should elaborate.
    – phemmer
    Commented Mar 12, 2012 at 13:01
  • @Lazer: is it Red Hat Enterprise Linux? What version?
    – pbm
    Commented Mar 12, 2012 at 23:48
  • Just out of curiosity, what directory do you expect to get to using file://localhost/tmp/common1/x86_64/redhat/50/base/ga/Server? A local file should be referenced as file:///path/to/file... Why the localhost in there? Do you actually have a directory named localhost in the root of your server??? Commented Mar 13, 2012 at 23:34
  • @pbm: Linux 2.6.18-
    – Lazer
    Commented Mar 14, 2012 at 12:18

4 Answers 4


Okay, a couple of things here:

Your repo location is apparently file://localhost/tmp/ (I'm not sure about using file://localhost/ but I'm assuming that it's a shortcut for going file:///, but the main issue is the use of /tmp in that path. Files located under /tmp will get cleaned out on reboot (most times). Which will explain later failures.

So, step 1 is restore your local repository (using the same method as you used to create it the first time, I'd recommend a location other than /tmp if you intend on using it again in the future - remember you edit your repository entry in yum.conf or yum.repos.d/ with the new path) or connect it to RHN (I'm assuming based on the directory structure this repo source you are using is of the RHEL 5 GOLD tree).

Once you have the repository setup, you will need to either install git from source, or from EPEL (Extra Packages for Enterprise Linux).

Just to note however:

  1. EPEL packages are built against the latest versions of RHEL, so if you are using 5.0 then you may have dependency conflicts, This is why RHN (subscription required) is the best choice for fixing your repository issue.
  2. If you aren't using RHEL, then you will need to fix your CentOS/OUL/SL repository configurations by hand, however the EPEL steps are equally valid.

I think that something is wrong with repository settings. Check entries in /etc/yum.repos.d/ or /etc/yum.conf or /etc/yum/...


It is obvious that baseurl in base repo is invalid. I was unable to find proper repositories for RHEL 5.6, but according to Wikipedia RHEL 5 is still supported so repositories should be available for 5.6 or at least for 5.8 as this is latest version from line 5.x.

I see two options:

According to Gilles answer in Is CentOS exactly the same as RHEL? you could also try adding CentOS repositories.

I'm not CentOS user but I found following repository config for CentOS:

[base] name=CentOS-5 - Base

If it return error try to replace $releasever by 5.


From what you are showing, it looks like you want to use a local copy of the RHEL DVD's Server directory and have yum use that as a local repository. This is common practice when your server is either not connected to the internet, or is not registered with RHN. However, you did it wrong.

Here's how I do it:

  1. Mount the RHEL DVD, and copy the entire Server directory to a sub directory of your choice (other than /tmp). I personally usually use /repo
  2. Create a new repo in /etc/yum.repos.d as follow (name it something like rhel-local-server.repo)

    name=RHEL Local Server Repository
  3. Remove the [base] section you've added in your /etc/yum.conf file, it doesn't belong there.

  4. Run yum clean all

  5. Run yum install git-core
  • 1
    There' no git-core package in rhel 5. It's available in EPEL and named git
    – Coren
    Commented Mar 17, 2012 at 17:52
  • I assumed it was there, should have checked. Either way, his repo config was incorrect though. Commented Mar 18, 2012 at 13:28

Have you tried 'yum clean all'?

  • @Steve: yes, same error again.
    – Lazer
    Commented Nov 17, 2010 at 10:25

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .