I'm using CentOS 6 from Docker, and when I install git, I get this dependency error:

Error: Package: glibc-2.12-1.166.el6_7.7.i686 (updates)
           Requires: glibc-common = 2.12-1.166.el6_7.7
           Installed: glibc-common-2.12-1.192.el6.x86_64 (@CR/6.7)
               glibc-common = 2.12-1.192.el6
           Available: glibc-common-2.12-1.166.el6.x86_64 (base)
               glibc-common = 2.12-1.166.el6
           Available: glibc-common-2.12-1.166.el6_7.1.x86_64 (updates)
               glibc-common = 2.12-1.166.el6_7.1
           Available: glibc-common-2.12-1.166.el6_7.3.x86_64 (updates)
               glibc-common = 2.12-1.166.el6_7.3
           Available: glibc-common-2.12-1.166.el6_7.7.x86_64 (updates)
               glibc-common = 2.12-1.166.el6_7.7

You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest

Service 'docker-project' failed to build: The command '/bin/sh -c yum install -y \
    java-1.8.0-openjdk-devel.x86_64 \
    unzip \
    git \
    && yum clean all' returned a non-zero code: 1

This was working a few days ago without any changes. What happened to the CentOS repository?

For reference, here is my Dockerfile:

FROM centos:6
RUN yum install -y \
        java-1.8.0-openjdk-devel.x86_64 \
        unzip \
        git \
    && yum clean all
  • Is that the epel repo is enabled? – GAD3R May 17 '16 at 20:37

It will be some conflicts whenever the EPEL repo is activated. Try to install git using the following command:

yum install git --disablerepo=epel

You can permanently exclude git from the EPEL repositories by adding exclude=git* to /etc/yum.repos.d/epel.repo file.


Removing the EPEL repo and --disablerep=epel did not help. Finally I did a docker pull centos:centos6 and that seems to have fixed it. I guess it was a temporary problem in the image and a recent update fixed.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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