Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am trying to install git on an OpenVZ container using the CentOs 6.3 precreated template. When I try the command line

yum install git

I get the message:

Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base:
 * epel:
 * extras:
 * rpmforge:
 * updates:
Setting up Install Process
No package git available.
Error: Nothing to do

As I understand, the git package should be in the centos6 base repository:

But it doesn't find it, I even have the EPEL and RPMForge repo enabled, but still can't find the git package.

yum repolist
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base:
 * epel:
 * extras:
 * rpmforge:
 * updates:
repo id                           repo name                                                           status
base                              CentOS-6 - Base                                                     4,776
epel                              Extra Packages for Enterprise Linux 6 - i386                        6,523
extras                            CentOS-6 - Extras                                                       4
rpmforge                          RHEL 6 - - dag                                         4,501
updates                           CentOS-6 - Updates                                                    596
vz-base                           vz-base                                                                 3
vz-updates                        vz-updates                                                              0
repolist: 16,403

The weirdest thing is that my OpenVZ server is running on CentOs 6.3 and I was able to install git without any issue.

Can you help me understanding why it doesn't find the package?

Thank you in advance.

share|improve this question

Your VPS provider has disabled the default CentOS repositories and replaced them with repos which do not actually provide access to the base system packages. This seems to be a common OpenVZ configuration issue.

I worked around it by:

  1. Deleting any file in /etc/yum.repos.d which referenced VZ repositories.
  2. Getting a clean copy of the latest centos-release RPM and installing that over the existing one:

    rpm -Uvh --replacefiles --replacepkgs centos-release-6*.rpm

The long-term solution is probably to stop using OpenVZ. I have yet to find a single public OpenVZ provider which manages to run a decent configuration.

share|improve this answer
Here is what I did: rm -f /etc/yum.repos.d/openvz.repo rpm -Uvh --replacefiles --replacepkgs… yum clean all yum update yum install git but it still give me the same error. Thank you. – drivard Oct 15 '12 at 15:12
Looks reasonable. At this point I would go shopping for a new (never OpenVZ) VPS. – Michael Hampton Oct 15 '12 at 15:14

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.