Quando tento fazer uma atualização ou instalar algo, o apt (-get ou aptitude) gera um erro, dizendo que o perl não pode encontrar XML / SAX / Debian.pm ao tentar configurar o libxml-libxml-perl. Aqui está a mensagem de erro completa:
configuring libxml-libxml-perl (2.0108+dfsg-1ubuntu0.1) ...
Can't locate XML/SAX/Debian.pm in @INC (you may need to install the XML::SAX::Debian module) (@INC contains: /usr/local/lib/perl5/site_perl/5.20.1/i686-linux-5.20.0-thread-multi-ld /usr/local/lib/perl5/site_perl/5.20.1 /usr/local/lib/perl5/5.20.1/i686-linux-5.20.0-thread-multi-ld /usr/local/lib/perl5/5.20.1 .) at /usr/bin/update-perl-sax-parsers line 19.
BEGIN failed--compilation aborted at /usr/bin/update-perl-sax-parsers line 19.
dpkg: error processing libxml-libxml-perl (--configure) :
sub-process script post-installation installed returned an error code 2
Errors have been encountered during execution :
libxml-libxml-perl
E: Sub-process /usr/bin/dpkg returned an error code (1)
Eu tentei remover (e limpar) libxml-libxml-perl, não funcionou.
Então eu encontrei (no pacote debian) e copiei o Debian.pm para /usr/local/lib/perl5/site_perl/5.20.1/XML/SAX/
.
Corrigido o erro, mas um outro apareceu:
Configuring libxml-libxml-perl (2.0108+dfsg-1ubuntu0.1) ...
update-perl-sax-parsers: Non-vendor version of XML::SAX is installed.
update-perl-sax-parsers: Automatic registration of SAX parsers might not work.
update-perl-sax-parsers: Registering Perl SAX parser XML::LibXML::SAX::Parser with priority 50...
Can't locate XML/LibXML/SAX/Parser.pm in @INC (you may need to install the XML::LibXML::SAX::Parser module) (@INC contains: /usr/local/lib/perl5/site_perl/5.20.1/i686-linux-5.20.0-thread-multi-ld /usr/local/lib/perl5/site_perl/5.20.1 /usr/local/lib/perl5/5.20.1/i686-linux-5.20.0-thread-multi-ld /usr/local/lib/perl5/5.20.1 .) at /usr/local/lib/perl5/site_perl/5.20.1/XML/SAX.pm line 147.
dpkg: error processing package libxml-libxml-perl (--configure) :
sub-process script post-installation installed returned error code 2
configuring de libgles1-mesa:i386 (10.1.3-0ubuntu0.4) ...
configuring de libshine3:i386 (3.1.0-2) ...
configuring de libva-drm1:i386 (1.4.0~trusty) ...
configuring de libvncclient0:i386 (0.9.9+dfsg-6~ubuntu14.04.1~ppa1) ...
Processing triggers (« triggers ») for libc-bin (2.19-0ubuntu6.6) ...
Errors have been encountered during execution :
libxml-libxml-perl
E: Sub-process /usr/bin/dpkg returned an error code (1)
Eu também tentei dpkg-reconfigure
, mas:
$ sudo dpkg-reconfigure libxml-libxml-perl
/usr/sbin/dpkg-reconfigure: libxml-libxml-perl is broken or not fully installed
Existe uma maneira de corrigir isso?
Obrigado pelas suas respostas.
P.S. : algumas mensagens na mensagem de erro estavam em francês e eu as traduzi. Elas podem não ser exatamente iguais à mensagem de erro em inglês.
EDITAR :
sudo dpkg-reconfigure libxml-libxml-perl
me dê isto: /usr/sbin/dpkg-reconfigure: libxml-libxml-perl is broken or not fully installed
.
e
sudo apt-get install --reinstall libxml-libxml-perl
dá:
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 7 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
E: Internal Error, No file name for libxml-libxml-perl:i386