3

I am trying to install GeoIP module to block country specific traffic to my website. My Website is LAMP configured and hosted on Amazon AWS EC2 instance.

As per some article on google, I followed these steps:

yum install epel-release

In response, I get

Package epel-release-6-8.9.amzn1.noarch already installed and latest version

Nothing to do

I followed Next Step,

sudo yum --enablerepo epel install mod_geoip GeoIP GeoIP-devel GeoIP-data zlib-devel

And received conflicts error,

Error: GeoIP-GeoLite-data conflicts with GeoIP-1.4.8-1.5.amzn1.x86_64

Error: httpd24-tools conflicts with httpd-tools-2.2.34-1.16.amzn1.x86_64

Error: httpd24 conflicts with httpd-2.2.34-1.16.amzn1.x86_64

How to resolve these conflicts or bypass these conflicts to install GeoIP module on EC2?

1 Answers1

3

As @MichaelHampton says EPEL is not compatible with Amazon Linux.

However you can often rebuild the EPEL source RPMs for Amazon Linux.

  1. Download the required packages' *.src.rpm files from EPEL, e.g. mod_geoip-...src.rpm.
  2. Run rpmbuild --rebuild mod_geoip-...src.rpm
  3. If everything works you will get mod_geoip-...x86-64.rpm built for your OS.

However chances are that a direct rebuild won't work - it may have missing dependencies, etc. In that case you will have to dig down to the RPM spec files and try to fix it. It may not be trivial, but you will certainly learn a lot about how RPMs are built along the way :)

MLu
  • 23,798
  • 5
  • 54
  • 81
  • cat: /usr/include/httpd/.mmn: No such file or directory error: Failed build dependencies: httpd-devel is needed by mod_geoip-1.2.10-1.amzn1.x86_64 GeoIP-devel >= 1.4.3 is needed by mod_geoip-1.2.10-1.amzn1.x86_64 – Vinay Ahlawat May 14 '19 at 05:18
  • @VinayAhlawat that’s when the fun begins ;) Good luck with it! – MLu May 14 '19 at 05:22