0

I wanted to install Python 2.7.9 on my Debian Wheezy and I've download the .deb file from Debian site. Unfortunately now I apparently have caused a bug, this is what I have after an apt-get upgrade:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
You might want to run 'apt-get -f install' to correct these.
The following packages have unmet dependencies:
 libpython2.7 : Depends: python2.7 (= 2.7.3-6+deb7u2) but 2.7.9-2 is installed
 python2.7 : Depends: python2.7-minimal (= 2.7.9-2) but 2.7.3-6+deb7u2 is installed
             Depends: libpython2.7-stdlib (= 2.7.9-2) but it is not installable
 python2.7-dev : Depends: python2.7 (= 2.7.3-6+deb7u2) but 2.7.9-2 is installed
E: Unmet dependencies. Try using -f.

If I try an 'apt-get -f install' it asks me to remove more than 2GB from my OS and I don't want this. Any idea?

Omer Dagan
  • 14,868
  • 16
  • 44
  • 60
Francesco Mantovani
  • 10,216
  • 13
  • 73
  • 113

2 Answers2

0

The right way when working with distributions such as Debian is two work with the official repositories, that is, using apt-get install rather than downloading and installing with dpkg -i.

If you work directly with dpkg, important information that apt needs is missing.

My suggestion for you is this-

1- Undo you changes by using dpkg -P on the package you installed manually

2- Run apt-get update

3- look for the package with apt- apt-cache search python=<version> or without version.

4- If you don't find the wanted version, you can use other official Debian repositories (include them in you apt sources list files)

Omer Dagan
  • 14,868
  • 16
  • 44
  • 60
  • dpkg -P not working; but dpkg --configure libpython2.7 gives: dpkg: dependency problems prevent configuration of libpython2.7: libpython2.7 depends on python2.7 (= 2.7.3-6+deb7u2); however: Version of python2.7 on system is 2.7.9-2. dpkg: error processing libpython2.7 (--configure): dependency problems - leaving unconfigured Errors were encountered while processing: libpython2.7 – Francesco Mantovani Jul 04 '15 at 00:52
  • Is there any way to downgrade Python to the previous one? – Francesco Mantovani Jul 04 '15 at 00:53
0

Fixed this way: as basically the problem was

python2.7 (= 2.7.3-6+deb7u2) but 2.7.9-2 is installed

I've downloaded python version 2.7.3-6+deb7u2 and with a simple dpkg -i I have installed it. The downgrading as been automatic

Francesco Mantovani
  • 10,216
  • 13
  • 73
  • 113