Search code examples
linuxubuntudependenciesopenldap

How do I fix broken dependencies if apt-get --fix-broken is giving me a "not known" error?


I've been attempting to install OpenLDAP on Ubuntu, but I keep receiving a dependency error whenever I try to install it.

The console output is:

dpkg: error processing package libapache2-mpm-itk (--configure):
 subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of apache2-mpm-itk:
 apache2-mpm-itk depends on libapache2-mpm-itk; however:
  Package libapache2-mpm-itk is not configured yet.

dpkg: error processing package apache2-mpm-itk (--configure):
 dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error from a previous failure.

Errors were encountered while processing:
 libapache2-mpm-itk
 apache2-mpm-itk

I tried running the code below to fix these errors:

sudo apt-get -f

But I received the error:

E: Command line option 'f' [from -f] is not known.

I have also tried to use the alternative --fix-broken, but I get the same error. Has anyone ever experience this and know a way around this?


Solution

  • First you'll have to resolve the problem with libapache2-mpm-itk. There isn't enough info in what you posted above to see why it's failing to install, but a quick workaround would be to just remove it:

    sudo apt-get purge libapache2-mpm-itk apache2-mpm-itk

    After that you should be able to install other packages again.

    -f has to be used with an action, for example: sudo apt-get -f install (you don't need to provide any packages names when doing this.)