Eu tentei usar o gerenciador de sistemas da AWS para verificar se meu Ubuntu EC2 está sem algum patch. Depois de "Executar um comando" usando o AWS-RunPatchBaseline, ele mostrou que a varredura do PatchLinux falhou. A mensagem de erro é mostrada abaixo.
Alguém sabe qual é o motivo e como corrigir / depurar?
Meu EC2 a ser corrigido é: ubuntu 16.04.
(Reading database
---Output truncated---
----------ERROR-------
debconf: unable to initialize frontend: Dialog
debconf: (TERM is not set, so the dialog frontend is not usable.)
debconf: falling back to frontend: Readline
debconf: unable to initialize frontend: Readline
debconf: (This frontend requires a controlling tty.)
debconf: falling back to frontend: Teletype
dpkg-preconfigure: unable to re-open stdin:
E: Sub-process /usr/bin/dpkg returned an error code (1)
WARNING: Could not install the python3-requests, this may cause the
patching operation to fail.
debconf: unable to initialize frontend: Dialog
debconf: (TERM is not set, so the dialog frontend is not usable.)
debconf: falling back to frontend: Readline
debconf: unable to initialize frontend: Readline
debconf: (This frontend requires a controlling tty.)
debconf: falling back to frontend: Teletype
dpkg-preconfigure: unable to re-open stdin:
E: Sub-process /usr/bin/dpkg returned an error code (1)
WARNING: Could not install the python3-apt, this may cause the patching
operation to fail.
failed to run commands: exit status 1
Atualização: na verdade eu cliquei em "Executar um comando" novamente, mas desta vez eu salvei a saída completa para o S3, agora eu vi mais uma mensagem de erro, parece que o motivo é: aws tentar instalar o python3-apt no meu EC2 e falhar.
na verdade, eu ssh para este ec2 e execute manualmente:
sudo apt-get update
e depois:
sudo apt-get -y upgrade
e mostrou este erro:
Preparing to unpack .../apport_2.20.1-0ubuntu2.13_all.deb ...
File "/usr/bin/pyclean", line 63
except (IOError, OSError), e:
^
SyntaxError: invalid syntax
dpkg: warning: subprocess old pre-removal script returned error exit
status 1
dpkg: trying script from the new package instead ...
File "/usr/bin/pyclean", line 63
except (IOError, OSError), e:
SyntaxError: invalid syntax
dpkg: error processing archive /var/cache/apt/archives/apport_2.20.1-
0ubuntu2.13_all.deb (--unpack):
subprocess new pre-removal script returned error exit status 1
Traceback (most recent call last):
File "/usr/bin/pycompile", line 35, in <module>
from debpython.version import SUPPORTED, debsorted, vrepr, \
File "/usr/share/python/debpython/version.py", line 24, in <module>
from ConfigParser import SafeConfigParser
ImportError: No module named 'ConfigParser'
dpkg: error while cleaning up:
subprocess installed post-installation script returned error exit
status 1
Errors were encountered while processing:
/var/cache/apt/archives/apport_2.20.1-0ubuntu2.13_all.deb
Reading package lists...
Building dependency tree...
Reading state information...
Acredito que se eu conseguir descobrir como executar o "sudo apt-get -y upgrade" com êxito, a edição original da verificação será resolvida. Alguém sabe como corrigir o problema quando eu executar manualmente "sudo apt-get -y upgrade"?