我无法fail2ban
在 CentOS 6.9 上安装。这是我的配置
# cat /etc/*release
CentOS release 6.9 (Final)
CentOS release 6.9 (Final)
CentOS release 6.9 (Final)
# rpm -q epel-release
epel-release-6-8.noarch
我的安装日志
# yum install fail2ban
Loaded plugins: fastestmirror
Setting up Install Process
Loading mirror speeds from cached hostfile
* base: mirror.awanti.com
* epel: ftp.nluug.nl
* extras: mirror.awanti.com
* rpmforge: mirror.nl.leaseweb.net
* updates: mirror.awanti.com
* webtatic: uk.repo.webtatic.com
Resolving Dependencies
--> Running transaction check
---> Package fail2ban.noarch 0:0.9.7-1.el7 will be installed
--> Processing Dependency: fail2ban-server = 0.9.7-1.el7 for package: fail2ban-0.9.7-1.el7.noarch
--> Processing Dependency: fail2ban-sendmail = 0.9.7-1.el7 for package: fail2ban-0.9.7-1.el7.noarch
--> Processing Dependency: fail2ban-firewalld = 0.9.7-1.el7 for package: fail2ban-0.9.7-1.el7.noarch
--> Running transaction check
---> Package fail2ban-firewalld.noarch 0:0.9.7-1.el7 will be installed
--> Processing Dependency: firewalld for package: fail2ban-firewalld-0.9.7-1.el7.noarch
---> Package fail2ban-sendmail.noarch 0:0.9.7-1.el7 will be installed
---> Package fail2ban-server.noarch 0:0.9.7-1.el7 will be installed
--> Processing Dependency: python(abi) = 2.7 for package: fail2ban-server-0.9.7-1.el7.noarch
--> Processing Dependency: systemd-python for package: fail2ban-server-0.9.7-1.el7.noarch
--> Processing Dependency: systemd for package: fail2ban-server-0.9.7-1.el7.noarch
--> Processing Dependency: systemd for package: fail2ban-server-0.9.7-1.el7.noarch
--> Finished Dependency Resolution
Error: Package: fail2ban-server-0.9.7-1.el7.noarch (epel)
Requires: python(abi) = 2.7
Installed: python-2.6.6-66.el6_8.x86_64 (@base)
python(abi) = 2.6
Available: python34-3.4.9-1.el7.x86_64 (epel)
python(abi) = 3.4
Available: python36-3.6.6-1.el7.x86_64 (epel)
python(abi) = 3.6
python(abi) = 3.6
Error: Package: fail2ban-server-0.9.7-1.el7.noarch (epel)
Requires: systemd-python
Error: Package: fail2ban-firewalld-0.9.7-1.el7.noarch (epel)
Requires: firewalld
Error: Package: fail2ban-server-0.9.7-1.el7.noarch (epel)
Requires: systemd
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest
我的Python日志
# python -V
Python 2.6.6
# python3.6 -V
Python 3.6.6
python-boto
UPD:之前安装已解决fail2ban
yum install python-boto
答案1
如果可能的话,在安装fail2ban之前将python包从epel更新为python36。
答案2
这似乎是缓存问题,因为运行以下命令后问题已解决:
yum clean all; yum makecache