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: will be installed
--> Processing Dependency: perl-Git = for package: git-
--> Processing Dependency: perl(Term::ReadKey) for package: git-
--> Processing Dependency: perl(Git) for package: git-
--> Processing Dependency: perl(Error) for package: git-
--> Running transaction check
---> Package perl-Error.noarch 1:0.17020-1.7.amzn1 will be installed
---> Package perl-Git.noarch 0: will be installed
--> Processing Dependency: perl(:MODULE_COMPAT_5.10.1) for package: perl-Git-
---> Package perl-TermReadKey.x86_64 0:2.30-18.8.amzn1 will be installed
--> Finished Dependency Resolution
Error: Package: perl-Git- (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:


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 any other answers on Server Fault.

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