I've ran the following command on Raspbian:

$ sudo apt-get upgrade

But now when I try to do:

$ sudo apt-get install -f

or any other apt-get command, I got this error and I can't get rid of it:

The following packages have unmet dependencies: 
idle:  Depends: python (= 2.7.3-4) 
but 2.7.3-4 + deb7u1 must be installed 
python: Depends: python-minimal (= 2.7.3-4 + deb7u1) 
but 2.7.3-4 is to be installed
E: Unmet dependencies.
Try 'apt-get-f install' with no packages   


$ apt-get install -f

I get this error:

Unpacking python-minimal 2.7.3-4
(using ... / python-minimal_2.7.3 deb7u1_all.deb-4 +)
...segmentation fault 
dpkg: warning: subprocess old pre-removal script returned error exit status 139 
dpkg: attempt to run the script from the new package instead 
...segmentation fault
dpkg: error processing / 
+ (- unpack): subprocess new pre-removal script
returned error exit status 139 
Errors were encountered while processing: 
/ var/cache/apt/archives/python-minimal_2.7.3-4 +deb7u1_all.d   

Any suggestions?

  • I am also getting same error while installing python, it shows unmet dependencies error. I tried above solutions but getting errors.
    – Rasp
    Nov 27, 2015 at 7:21
  • did you also run apt-get update?
    – Eric
    Nov 27, 2015 at 13:03

1 Answer 1


First, try apt-get install -f. From the man page:

-f, --fix-broken

Fix; attempt to correct a system with broken dependencies in place. This option, when used with install/remove, can omit any packages to permit APT to deduce a likely solution. If packages are specified, these have to completely correct the problem. The option is sometimes necessary when running APT for the first time; APT itself does not allow broken package dependencies to exist on a system. It is possible that a system's dependency structure can be so corrupt as to require manual intervention (which usually means using dselect(1) or dpkg --remove to eliminate some of the offending packages).

If that does not work out, try python --version; you should get Python 2.7.3. If instead you get another segmentation fault or other errors, try apt-get install -f --reinstall python.

  • with "python --version" I get Python 2.7.3 but with "apt-get install -f --reinstall python" I get the same error
    – jrk
    Jan 11, 2014 at 14:46
  • Nobody can help me ?
    – jrk
    Jan 12, 2014 at 23:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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