Question

How can I get fail2ban to install on Centos 7.4?

Bit of a noob on the command line, and have scoured many answers to problems with fail2ban and Centos 7.x (I’m on 7.4), none of which seem to get me past my problem.

I’ve done yum install epel-release and this shows in my repolist:

repo id                                                     repo name                                                                                 status
base/7/x86_64                                               CentOS-7 - Base                                                                            9,591
epel/x86_64                                                 Extra Packages for Enterprise Linux 7 - x86_64                                            12,219
extras/7/x86_64                                             CentOS-7 - Extras                                                                            329
updates/7/x86_64                                            CentOS-7 - Updates                                                                         1,698

When I ask whether fail2ban is available, the answer is yes…

Available Packages
fail2ban.noarch                                                               0.9.7-1.el7                                                               epel

But when I install, it seems to attempt a different version and then has issues with an apparently too-new version of Python.

Error: Package: fail2ban-0.9.6-1.el6.1.noarch (epel)
       Requires: python(abi) = 2.6
       Installed: python-2.7.5-58.el7.x86_64 (installed)
           python(abi) = 2.7
           python(abi) = 2.7
       Available: python34-3.4.5-4.el6.i686 (epel)
           python(abi) = 3.4

It gives these two options to work around the problem, but I’m not sure how wise either of those is.

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

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Accepted Answer

Solved. While checking for any package updates I noticed the epel repository was erroring with a 404. Once again I removed the repository, cleaned, and re-installed. A different version of the repository resulted and my first attempt to install fail2ban completed successfully.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.