1

Everything was working fine until I ran an update. Since the fail2ban package is giving me errors now. I decided that I would try to uninstall it and then reinstall it again.

So I ran sudo apt-get remove fail2ban. Here was the output that I got.

Reading package lists... Done
Building dependency tree
Reading state information... Done
The following package was automatically installed and is no longer required:
  python-gamin
Use 'apt-get autoremove' to remove it.
The following packages will be REMOVED:
  fail2ban
0 upgraded, 0 newly installed, 1 to remove and 4 not upgraded.
After this operation, 349 kB disk space will be freed.
Do you want to continue [Y/n]? y
dpkg: warning: files list file for package 'fail2ban' missing; assuming package has no files currently installed
(Reading database ... 98934 files and directories currently installed.)
Removing fail2ban ...
pycentral: pycentral pkgremove: package fail2ban is not installed
pycentral pkgremove: package fail2ban is not installed
dpkg: error processing fail2ban (--remove):
 subprocess installed pre-removal script returned error exit status 1
Errors were encountered while processing:
 fail2ban
E: Sub-process /usr/bin/dpkg returned an error code (1)

About that warning with the files list file for package 'fail2ban', I removed that file in attempt to fix this problem.

I tried to use sudo apt-get install fail2ban but it says that it's already on it's newest version. Even though it's not working.

Here are some other things I've tried.

  • sudo apt-get remove --purge fail2ban
  • sudo apt-get install --force-yes fail2ban
  • sudo apt-get remove --force-yes fail2ban
  • sudo apt-get install fail2ban --reinstall

I have no idea what I should do from here. Any help with this would be awesome.

I'm running Raspbian Wheezy 7 on the RPi 2.

  • You don't say what happens when you run this sudo apt-get install --force-yes fail2ban – Steve Robillard Sep 15 '16 at 16:10
  • @SteveRobillard It says it's already installed, on it's newest version. I've messed up the manager pretty badly. I might have to restore from an earlier backup. – Zachary Vincze Sep 15 '16 at 16:12
2

I've finally got it working again. I downloaded the fail2ban package from the debian package repository using wget http://ftp.us.debian.org/debian/pool/main/f/fail2ban/fail2ban_0.8.13-1_all.deb.

Once the package was downloaded, I used sudo dpkg -i fail2ban_0.8.13-1_all.deb. Then following that command, I used sudo apt-get -f install.

And finally, I used sudo apt-get install fail2ban. Everything seems to be working great now.

| improve this answer | |
0

I am a bit too late, but sudo apt-get install fail2ban --reinstall would have installed fail2ban even if it is already installed.

This should have the same effect as what you finally did.

| improve this answer | |
  • This actually didn't work. Sorry for not including this in my question, but it did end up returning the same error. There was some major problems with my package manager. – Zachary Vincze Sep 17 '16 at 18:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.