Reverter a instalação do python

0

Estou usando o ubuntu preciso. A versão do Python instalada nesta versão é 2.7.6. Mas Cloudera esperava 2.7.3. Eu apenas segui este . Todo o sistema tornou-se não funcional. Eu não consegui nem instalar o jdk. O que eu quero é que eu queira reverter essa mudança. De alguma forma eu preciso voltar ao padrão 2.7.6.

Alguma sugestão?

EDIT1

E: Sub-process /usr/bin/dpkg returned an error code (1)

sudo dpkg -C returns

 The following packages have been unpacked but not yet configured.
 They must be configured using dpkg --configure or the configure
  menu option in dselect for them to work:
 libgnome2-0:amd64    The GNOME library - runtime files
libgnome2-bin        The GNOME library - binary files
libgnome2-common     The GNOME library - common files
libgnomevfs2-0:amd64 GNOME Virtual File System (runtime libraries)
libgnomevfs2-common  GNOME Virtual File System (common files)

The following packages are only half configured, probably due to problems
configuring them the first time.  The configuration should be retried using
dpkg --configure <package> or the configure menu option in dselect:
gconf2               GNOME configuration database system (support tools)

Se eu tentar reconfigurar, é como um erro cíclico. Finalmente, ele aponta o erro do módulo IO do Python

EDIT2

    Reading package lists... Done
    Building dependency tree       
    Reading state information... Done
    python is already the newest version.
    The following packages were automatically installed and are no longer required:
      gcc-4.8-base:i386 libasan0:i386 libatomic1:i386 libc6-dev:i386 libgcc-4.8-dev:i386 libgmp-dev:i386 libgmpxx4ldbl:i386 libgnutls-dev:i386 libgnutls-openssl27:i386
      libgnutls28-dev:i386 libgnutlsxx28:i386 libgomp1:i386 libitm1:i386 liboath-dev:i386 liboath0:i386 libopenconnect3:i386 libp11-kit-dev:i386 libproxy-dev:i386
      libproxy1:i386 libquadmath0:i386 libstdc++-4.8-dev:i386 libstoken-dev:i386 libstoken1:i386 libtasn1-6-dev:i386 libtomcrypt-dev:i386 libtomcrypt0:i386 libtommath0:i386
      libxml2:i386 libxml2-dev:i386 linux-libc-dev:i386 nettle-dev:i386 zlib1g-dev:i386
    Use 'apt-get autoremove' to remove them.
    0 upgraded, 0 newly installed, 0 to remove and 293 not upgraded.
    6 not fully installed or removed.
    After this operation, 0 B of additional disk space will be used.
    Do you want to continue? [Y/n] Y
    Setting up gconf2 (3.2.6-2ubuntu1) ...
    /var/lib/dpkg/info/gconf2.postinst: 74: /var/lib/dpkg/info/gconf2.postinst: gconf-schemas: not found
    dpkg: error processing package gconf2 (--configure):
     subprocess installed post-installation script returned error exit status 127
    dpkg: dependency problems prevent configuration of libgnomevfs2-common:
     libgnomevfs2-common depends on gconf2 (>= 2.28.1-2); however:
      Package gconf2 is not configured yet.

    dpkg: error processing package libgnomevfs2-common (--configure):
     dependency problems - leaving unconfigured
    dpkg: dependency problems prevent configuration of libgnomevfs2-0:amd64:
     libgnomevfs2-0:amd64 depends on libgnomevfs2-common (= 1:2.24.4-6ubuntu1); however:
      Package libgnomevfs2-common is not configured yet.

    dpkg: error processing package libgnomevfs2-0:amd64 (--configure):
     dependency problems - leaving unconfigured
    dpkg: dependency problems prevent configuration of libgnome2-common:
     libgnome2-common depends on gconf2 (>= 2.28.1-2); however:
      Package gconf2 is not configured yet.

    dpkg: error processing package libgnome2-common (--configure):
     dependency problems - leaving unconfigured
    dpkg: dependency problems prevent configuration of libgnome2-0:amd64:
     libgnome2-0:amd64 depends on libgnomevfs2-0 (>= No apport report written because the error message indicates its a followup error from a previous failure.
                                                                                                                                                       No apport report written because the error message indicates its a followup error from a previous failure.
                                                                                       No apport report written because MaxReports is reached already
                                                                                                                                                     No apport report written because MaxReports is reached already
                                         No apport report written because MaxReports is reached already
                                                                                                       1:2.17.90); however:
      Package libgnomevfs2-0:amd64 is not configured yet.
     libgnome2-0:amd64 depends on libgnome2-common (>= 2.32); however:
      Package libgnome2-common is not configured yet.
     libgnome2-0:amd64 depends on libgnome2-common (<< 2.33); however:
      Package libgnome2-common is not configured yet.

    dpkg: error processing package libgnome2-0:amd64 (--configure):
     dependency problems - leaving unconfigured
    dpkg: dependency problems prevent configuration of libgnome2-bin:
     libgnome2-bin depends on libgnome2-0 (>= 2.17.3); however:
      Package libgnome2-0:amd64 is not configured yet.

    dpkg: error processing package libgnome2-bin (--configure):
     dependency problems - leaving unconfigured
    Errors were encountered while processing:
     gconf2
     libgnomevfs2-common
     libgnomevfs2-0:amd64
     libgnome2-common
     libgnome2-0:amd64
     libgnome2-bin
    E: Sub-process /usr/bin/dpkg returned an error code (1)
    
por Gops AB 18.06.2015 / 07:28

2 respostas

0

Provavelmente, você está recebendo problemas para reinstalar o python a partir do apt-get, porque a instalação do tarball criou os arquivos usados no python

Você pode baixar o pacote python e suas dependências, colocar todos os arquivos no mesmo diretório e usar o dpkg para instalar sobrescrevendo os arquivos existentes:

  1. Para obter o pacote do requeride, você pode executar apenas apt-get install python apenas para obter a lista dos pacotes que o apt deve instalar.

  2. Para baixá-los, use o comando apt-get download [paste here the list of the packages] em uma pasta vazia

  3. E para instalar, use nesta mesma pasta: dpkg --force-overwrite -i *.deb

Espero que funcione. Boa sorte.

Editar: Minha resposta não considerou essa edição. Você deve corrigir os problemas que você obteve com os pacotes libgnome * antes de tentar acima.

    
por Danilo de Andrade Mendes 18.06.2015 / 07:48
0

Como eu vejo em outro post que você considera um ubuntu re-install, então você pode tentar o seguinte:

$ dpkg --list | grep -i python > ~/pythonpackages.txt
$ ### txt file just to review what was installed
$ sudo apt-get purge python*          #remove all python related packages
$ sudo rm -rf /var/lib/apt/lists      #remove apt information
$ sudo updatedb                       #refill the file location database
$ locate python                       #find all python related files
$ # remove all directories and files that you find with python
$ apt-get update
$ apt-get install python

Nota: Esta não é uma limpeza ou reversão limpa, mas uma remoção mais brutal do que estiver relacionado ao python. Então você pode tentar instalar todos os seus pacotes python.

    
por aldwinaldwin 18.06.2015 / 09:54