Perl compatability issues when installing Git on EC2

twreid asked:

Can anyone help me install git on one of my EC2 boxes?

When I run:

sudo yum install git

I get:

Resolving Dependencies
--> Running transaction check
---> Package git.x86_64 0:1.8.2.1-1.el6 will be installed
--> Processing Dependency: perl-Git = 1.8.2.1-1.el6 for package: git-1.8.2.1-1.el6.x86_64
--> Processing Dependency: perl(Term::ReadKey) for package: git-1.8.2.1-1.el6.x86_64
--> Processing Dependency: perl(Git) for package: git-1.8.2.1-1.el6.x86_64
--> Processing Dependency: perl(Error) for package: git-1.8.2.1-1.el6.x86_64
--> Running transaction check
---> Package perl-Error.noarch 1:0.17020-1.7.amzn1 will be installed
---> Package perl-Git.noarch 0:1.8.2.1-1.el6 will be installed
--> Processing Dependency: perl(:MODULE_COMPAT_5.10.1) for package: perl-Git-1.8.2.1-1.el6.noarch
---> Package perl-TermReadKey.x86_64 0:2.30-18.8.amzn1 will be installed
--> Finished Dependency Resolution
Error: Package: perl-Git-1.8.2.1-1.el6.noarch (ean_x86_64_repo)
           Requires: perl(:MODULE_COMPAT_5.10.1)
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest

I even tried downloading the rpm for the 5.10 perl modules and using:

sudo yum downgrade

It still wouldn’t install.

Please help this EC2 instance is used to automatically run performance tests on our services and it has to checkout the tests from a git repo, but I can’t even install git. In the past I have built git from source, but I am trying to get this environment to run from chef so would prefer to find a workaround for yum.

I am running on Amazon Linux with the EPEL repos of:

#baseurl=http://download.fedoraproject.org/pub/epel/6/$basearch
#baseurl=http://download.fedoraproject.org/pub/epel/6/$basearch/debug
#baseurl=http://download.fedoraproject.org/pub/epel/6/SRPMS

My answer:


The EPEL repository is intended for use with Red Hat Enterprise Linux and its clones (e.g. CentOS, Scientific Linux). It is not guaranteed to work with other distributions, even if they use RPM. Since Amazon Linux is not a clone of RHEL, (it was a fork and is significantly different today) and is not guaranteed to be compatible with packages built for RHEL, this is why it is not working.

The only thing you can do is to remove the EPEL repository, or switch to a distribution other than Amazon Linux.


View the full question and answer on Server Fault.

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.