Estou tentando reinstalar o python2.6 no debian 6, mas recebo:
root@ff: apt-get install --reinstall python2.6
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:
python-pkg-resources : Depends: python (< 2.7) but 2.7.5-5 is to be installed
python-setuptools : Depends: python (< 2.7) but 2.7.5-5 is to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
Observe que iniciar o python2.6 funciona bem:
:~$ python2.6
Python 2.6.6 (r266:84292, Dec 26 2010, 22:31:48)
[GCC 4.4.5] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>>
Mas é o aplicativo que preciso usar que depende do python que está quebrado agora, por exemplo, pip:
~$ pip
Traceback (most recent call last):
File "/usr/bin/pip", line 7, in <module>
from pip.log import logger
ImportError: No module named pip.log
Eu já instalei o python2.7 e usei:
update-alternatives --config python
para voltar para o 2.6. Mas parece que o aplicativo instalado usando o python 2.6 foi corrompido pela instalação do 2.7.
Eu tentei desinstalar o python2.7. Mas ele diz que não está instalado, mesmo que eu possa iniciá-lo a partir de um terminal:
# apt-get purge python2.7
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package python2.7 is not installed, so not removed
0 upgraded, 0 newly installed, 0 to remove and 460 not upgraded.
# python
Python 2.7.6 (default, Jan 11 2014, 14:34:26)
[GCC 4.8.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>>
Parece que é necessária uma reinstalação completa do sistema, mas gostaria de evitar isso, se possível.
E também tentou restaurar um arquivo de status antigo:
# cp /var/backups/dpkg.status.2 /var/lib/dpkg/status
# apt-get clean
# apt-get update
E minha lista / etc / apt / sources:
# deb cdrom:[Debian GNU/Linux 6.0.4 _Squeeze_ - Official amd64 NETINST Binary-1 20120129-00:39]/ squeeze main
#deb cdrom:[Debian GNU/Linux 6.0.4 _Squeeze_ - Official amd64 NETINST Binary-1 20120129-00:39]/ squeeze main
deb http://ftp.se.debian.org/debian/ squeeze main
deb-src http://ftp.se.debian.org/debian/ squeeze main
deb http://security.debian.org/ squeeze/updates main
deb-src http://security.debian.org/ squeeze/updates main
# squeeze-updates, previously known as 'volatile'
deb http://ftp.se.debian.org/debian/ squeeze-updates main
deb-src http://ftp.se.debian.org/debian/ squeeze-updates main
deb http://mirror.cse.iitk.ac.in/debian/ testing main contrib
Agora que eu tento instalar python-twisted eu recebo:
# apt-get install python-twisted
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
iso-codes libserf-0-0 python-apt-common lsb-release
Use 'apt-get autoremove' to remove them.
The following extra packages will be installed:
cpp-4.4 g++-4.4 gcc-4.4 gcc-4.4-base gcc-4.8-base libapr1 libapr1-dev libaprutil1 libaprutil1-dbd-sqlite3 libaprutil1-dev libaprutil1-ldap libc-dev-bin libc6
libc6-dbg libc6-dev libc6-i386 libdb5.1 libexpat1 libexpat1-dev libffi6 libgcc1 libgmp10 libgomp1 liblzma5 libmpfr4 libpython-dev libpython-stdlib
libpython2.7 libpython2.7-dev libpython2.7-minimal libpython2.7-stdlib libsasl2-2 libsasl2-modules libsasl2-modules-db libsctp-dev libsctp1 libserf-1-1
libsqlite3-0 libsqlite3-dev libssl1.0.0 libstdc++6 libstdc++6-4.4-dev libsvn1 libtinfo5 libxml2 linux-headers-2.6.32-5-common locales make multiarch-support
python python-crypto python-dev python-libxml2 python-lxml python-minimal python-openssl python-pkg-resources python-setuptools python-sqlite python-support
python-svn python-twisted-bin python-twisted-conch python-twisted-core python-twisted-lore python-twisted-mail python-twisted-names python-twisted-news
python-twisted-runner python-twisted-web python-twisted-words python-yaml python-zope.interface python2.7 python2.7-dev python2.7-minimal subversion
A lista acima contém um monte de dependências python2.7 ... de onde elas vêm? Não deveria ser possível instalar python-twisted para python2.6?