3

I am trying to install fail2ban on CentOS but I can't figure out why it won't install:

[root@server ~]# yum install fail2ban
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirror.linux.duke.edu
 * epel: mirror.steadfast.net
 * extras: centosx5.centos.org
 * updates: centosc6.centos.org
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package fail2ban.noarch 0:0.8.4-29.el5 will be installed
--> Processing Dependency: shorewall for package: fail2ban-0.8.4-29.el5.noarch
--> Processing Dependency: python-inotify for package: fail2ban-0.8.4-29.el5.noarch
--> Processing Dependency: gamin-python for package: fail2ban-0.8.4-29.el5.noarch
--> Running transaction check
---> Package gamin-python.i686 0:0.1.10-9.el6 will be installed
---> Package python-inotify.noarch 0:0.9.1-1.el5 will be installed
--> Processing Dependency: python(abi) = 2.4 for package: python-inotify-0.9.1-1.el5.noarch
---> Package shorewall.noarch 0:4.0.15-1.el5 will be installed
--> Processing Dependency: shorewall-perl = 4.0.15-1.el5 for package: shorewall-4.0.15-1.el5.noarch
--> Processing Dependency: shorewall-shell = 4.0.15-1.el5 for package: shorewall-4.0.15-1.el5.noarch
--> Processing Dependency: shorewall-common = 4.0.15-1.el5 for package: shorewall-4.0.15-1.el5.noarch
--> Running transaction check
---> Package python-inotify.noarch 0:0.9.1-1.el5 will be installed
--> Processing Dependency: python(abi) = 2.4 for package: python-inotify-0.9.1-1.el5.noarch
---> Package shorewall-common.noarch 0:4.0.15-1.el5 will be installed
---> Package shorewall-perl.noarch 0:4.0.15-1.el5 will be installed
---> Package shorewall-shell.noarch 0:4.0.15-1.el5 will be installed
--> Finished Dependency Resolution
Error: Package: python-inotify-0.9.1-1.el5.noarch (epel)
           Requires: python(abi) = 2.4
           Installed: python-2.6.6-29.el6_3.3.i686 (@updates)
               python(abi) = 2.6
           Available: python-2.6.6-29.el6_2.2.i686 (base)
               python(abi) = 2.6
           Available: python26-2.6.8-2.el5.i386 (epel)
               python(abi) = 2.6
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest
[root@server ~]# 
2
  • 1
    What version of CentOS is installed? What repositories are installed? Are all the enabled repositories matching the same major version as the base OS install? It looks like you have a mix of 5.x and 6.x packages installed, judging from the error. Commented Mar 1, 2013 at 22:09
  • @allquixotic, I believe OP is trying to install a package from EPEL (old version, i.e. CentOS 6 and EPEL 5).
    – vonbrand
    Commented Mar 2, 2013 at 2:05

1 Answer 1

1

It's probably due to a conflict between repos and/or packages from an outdated (e.g. el5) repo on CentOS 6. Take a look at this thread for good hints on where to start troubleshooting.

This worked for me, YMMV:

  1. Find all packages installed with el5 and remove them. You can find them like this:

    rpm -qa|grep el5
    
  2. Remove the el5 repository

    yum repolist
    rpm -e <repo name>
    
  3. Install the correct EPEL repo. If you're on CentOS 6 32-bit like me:

    rpm -Uvh http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm
    
  4. Clean the cache for yum (try this first - maybe it's all it takes):

    yum clean 
    

    or

    yum clean expire-cache
    

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .