Problema do Python com o Let's Encrypt [duplicate]

0

Ao tentar usar o seguinte comando para configurar meus certificados:

./letsencrypt-auto --apache -d example.com

Eu recebo este erro do Python:

dpkg: dependency problems prevent configuration of python-virtualenv:
 python-virtualenv depends on python-pkg-resources; however:
  Package python-pkg-resources is not configured yet.
 python-virtualenv depends on python-setuptools; however:
  Package python-setuptools is not configured yet.
 python-virtualenv depends on python (>= 2.7); however:
  Package python is not configured yet.
 python-virtualenv depends on python (<< 2.8); however:
  Package python is not configured yet.
 python-virtualenv depends on python:any (>= 2.7.1-0ubuntu2); however:
  Package python is not configured yet.

dpkg: error processing package python-virtualenv (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 python-minimal
 python
 python-dev
 python-pkg-resources
 python-setuptools
 python-virtualenv
E: Sub-process /usr/bin/dpkg returned an error code (1)

Leva a um buraco de problemas. Eu tento: sudo dpkg --configurar python mas aparentemente o Python-minimal também não está configurado. Tente "sudo dpkg --configure python-minimal" e obtenha o seguinte:

Setting up python-minimal (2.7.5-5ubuntu3) ...
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/runpy.py", line 162, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/usr/local/lib/python2.7/runpy.py", line 72, in _run_code
    exec code in run_globals
  File "/usr/local/lib/python2.7/compileall.py", line 16, in <module>
    import struct
  File "/usr/local/lib/python2.7/struct.py", line 1, in <module>
    from _struct import *
ImportError: No module named _struct
dpkg: error processing package python-minimal (--configure):
 subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
 python-minimal

Eu tentei remover todos eles e reinstalar sem sucesso.

    
por hockeymikey 24.07.2016 / 07:31

1 resposta

0

Resolvi meu problema. Esse tópico tinha a resposta: link

Edite o arquivo a seguir.

nano /var/lib/dpkg/info/python-minimal.postinst

De

#! /bin/sh
set -e


python2.7 -m compileall /usr/share/python/ >/dev/null

para

#! /bin/sh
set -e


python -m compileall /usr/share/python/ >/dev/null

Então

apt-get install python2.7-minimal
    
por hockeymikey 17.08.2016 / 08:59

Tags