Linux Mint 13 Problem - Nenhum módulo chamado site

2

O sistema de 64 bits do meu Linux Mint 13 desenvolveu um problema. Enquanto eu posso executar comandos básicos como ls e vi se eu tentar algo mais complexo (eu tentei python2.7, mysql-workbench e addusr) eu recebo: -

Could not find platform independent libraries <prefix>
Could not find platform dependent libraries <exec_prefix>
Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
ImportError: No module named site

Eu fui para outro sistema (Mint 13 32-bit) e executei:

# echo $PYTHONHOME,

e tenho uma linha em branco, então não faço ideia do que

<prefix>[:<exec_prefix>]

são?

Não sabe para onde ir em seguida?

Depois de pesquisar mais, experimentei tanto “sudo dpkg –configure -a” e “sudo apt-get install -f” com os seguintes resultados: -

HP-255-G1 # sudo dpkg --configure -a
dpkg: dependency problems prevent configuration of python-appindicator:
python-appindicator depends on libappindicator1 (= 0.4.92-0ubuntu1);
however:
Version of libappindicator1 on system is 0.4.92-0ubuntu1.1.
dpkg: error processing python-appindicator (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of python-uno:
 python-uno depends on libreoffice-core (= 1:3.5.2-2ubuntu1); however:
Version of libreoffice-core on system is 1:3.5.7-0ubuntu7.
dpkg: error processing python-uno (--configure):
dependency problems - leaving unconfigured
Errors were encountered while processing:
python-appindicator
 python-uno

HP-255-G1 # sudo apt-get install -f
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Correcting dependencies... Done
The following extra packages will be installed:
python-appindicator python-uno
The following packages will be upgraded:
python-appindicator python-uno
2 upgraded, 0 newly installed, 0 to remove and 690 not upgraded.
2 not fully installed or removed.
E: Could not get lock /var/cache/apt/archives/lock - open (11: Resource temporarily unavailable)
E: Unable to lock directory /var/cache/apt/archives/

Então, parece que o "python-uno" e o "python-appindicator" são centrais para alguns dos problemas, mas para onde ir agora?

Aqui está a saída solicitada: -

HP-255-G1# apt-cache policy python-uno python-appindicator
python-uno:
Installed: 1:3.5.2-2ubuntu1
Candidate: 1:3.5.7-0ubuntu7
Version table:
1:3.5.7-0ubuntu7 0
500 http://archive.ubuntu.com/ubuntu/ precise-updates/main amd64 Packages
500 http://security.ubuntu.com/ubuntu/ precise-security/main amd64 Packages
*** 1:3.5.2-2ubuntu1 0
500 http://archive.ubuntu.com/ubuntu/ precise/main amd64 Packages
100 /var/lib/dpkg/status
python-appindicator:
Installed: 0.4.92-0ubuntu1
Candidate: 0.4.92-0ubuntu1.1
Version table:
0.4.92-0ubuntu1.1 0
500 http://archive.ubuntu.com/ubuntu/ precise-updates/main amd64 Packages
*** 0.4.92-0ubuntu1 0
500 http://archive.ubuntu.com/ubuntu/ precise/main amd64 Packages
100 /var/lib/dpkg/status

Consegui executar o Gerenciador de Pacotes Synaptic a partir da linha de comando e tentei atualizar python-uno e python-appindicator. Isso falhou, mas esperamos que a saída (abaixo) seja outra pista: -

E: /var/cache/apt/archives/python-appindicator_0.4.92-0ubuntu1.1_amd64.deb:
subprocess new pre-removal script returned error exit status 1
E: /var/cache/apt/archives/python-uno_1%3a3.5.7-0ubuntu7_amd64.deb:
subprocess new pre-removal script returned error exit status 1
    
por MichaelJohn 12.02.2015 / 17:53

1 resposta

2

Após a discussão com o cartaz no chat, começando link , a máquina do pôster acabou /usr/lib/python2.7 , consulte link . Isso é responsável pela maioria dos problemas do pôster. Em particular, os erros:

Could not find platform independent libraries <prefix>
Could not find platform dependent libraries <exec_prefix>
Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
ImportError: No module named site

provêm dessas bibliotecas ausentes.

A próxima coisa a fazer é restaurar as bibliotecas Python básicas em /usr/lib/python2.7 . Uma maneira de fazer isso é fazer o download dos arquivos deb correspondentes a python2.7 , python2.7-minimal e libpython2.7 e, em seguida, instalá-los usando dpkg -i . Ou seja,

apt-get download python2.7 python2.7-minimal libpython2.7
dpkg -i python*.deb

Uma vez feito isto, esperamos que o sistema de pacotes pare de pirar. Em seguida, instale debsums , se ainda não estiver instalado, e restaure os arquivos ausentes restantes usando debsums -as .

    
por 16.02.2015 / 09:47