install python2.7 on Squeeze V6.0

eh2006re's picture

Forums: 

Hello, Experts

I have installed Debian Squeeze V6.0 on my lab PC, it has default python 2.6.6-3+squeeze7.
I also did
apt-get install -y python-wxgtk2.8

for one of our software.

Now, I need to install python2.7 for using modbus (pylibmodbus)

I was trying one website 's suggestion
===========
http://www.yodi.sg/install-python-2-7-debian-6-0-squeeze/
Here are guide to install Python 2.7 into Debian 6.0 Squeeze

1. Add new repo into “/etc/apt/sources.list”
deb http://ftp.uk.debian.org/debian/ testing main contrib non-free

2. Update and Upgrade
apt-get update && apt-get upgrade -y

3. Install python 2.7 and set as default
apt-get install libc6-dev
apt-get install python2.7
update-alternatives --install /usr/bin/python python /usr/bin/python2.7 10
===================

but, during installing libc6-dev, it failed. see below. could someone give me some suggestion/advice?

Best regards

xiaofeng

============
root@atcghost:~# apt-get install libc6-dev
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:
libc6-dev : Depends: libc-dev-bin (= 2.17-92+b1) but it is not going to be installed
Depends: linux-libc-dev but it is not going to be installed
Breaks: gcc-4.4 (= 2.7.5-1~) but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).

root@atcghost:~# apt-get -f install
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... failed.
The following packages have unmet dependencies:
python-dev : Depends: python (= 2.7.5-4) but 2.6.6-3+squeeze7 is installed
Depends: libpython-dev (= 2.7.5-4) but it is not installed
Depends: python2.7-dev (>= 2.7.5-1~) but it is not installed
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.
E: Unable to correct dependencies