
Eu estava tentando instalar o certificado SSL autoassinado com sudo dpkg-reconfigure ca-certificates
comando, mas antes que pudesse terminar, meu computador foi reiniciado devido a uma falha de energia.
Agora, quando executo sudo dpkg-reconfigure ca-certificates
o comando, recebo o seguinte erro:
sudo dpkg-reconfigure ca-certificates
/usr/sbin/dpkg-reconfigure: ca-certificates is broken or not fully installed
Quando tento sudo update-ca-certificates
, estou recebendo os seguintes erros:
sudo update-ca-certificates
Updating certificates in /etc/ssl/certs...
Unknown regexp modifier "/b" at /usr/bin/c_rehash line 15, at end of line
Unknown regexp modifier "/W" at /usr/bin/c_rehash line 26, at end of line
Unknown regexp modifier "/3" at /usr/bin/c_rehash line 26, at end of line
Unknown regexp modifier "/2" at /usr/bin/c_rehash line 26, at end of line
No such class installdir at /usr/bin/c_rehash line 58, near "Prefix our installdir"
(Might be a runaway multi-line // string starting on line 26)
syntax error at /usr/bin/c_rehash line 58, near "Prefix our installdir"
Execution of /usr/bin/c_rehash aborted due to compilation errors.
Quando tento sudo apt install ca-certificates -f
, recebo os seguintes erros:
sudo apt install ca-certificates -f
Reading package lists... Done
Building dependency tree
Reading state information... Done
ca-certificates is already the newest version (20160104ubuntu1).
0 upgraded, 0 newly installed, 0 to remove and 5 not upgraded.
1 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 ca-certificates (20160104ubuntu1) ...
Processing triggers for ca-certificates (20160104ubuntu1) ...
Updating certificates in /etc/ssl/certs...
Unknown regexp modifier "/b" at /usr/bin/c_rehash line 15, at end of line
Unknown regexp modifier "/W" at /usr/bin/c_rehash line 26, at end of line
Unknown regexp modifier "/3" at /usr/bin/c_rehash line 26, at end of line
Unknown regexp modifier "/2" at /usr/bin/c_rehash line 26, at end of line
No such class installdir at /usr/bin/c_rehash line 58, near "Prefix our installdir"
(Might be a runaway multi-line // string starting on line 26)
syntax error at /usr/bin/c_rehash line 58, near "Prefix our installdir"
Execution of /usr/bin/c_rehash aborted due to compilation errors.
dpkg: error processing package ca-certificates (--configure):
subprocess installed post-installation script returned error exit status 255
Errors were encountered while processing:
ca-certificates
E: Sub-process /usr/bin/dpkg returned an error code (1)
Por causa disso, não consigo nem enviar meu trabalho para o repositório Git. Estou recebendo o seguinte erro quando tento fazer isso:
fatal: unable to access 'https://github.com/***/***-tdd.git/': Problem with the SSL CA cert (path? access rights?)
Alguém sabe como consertar isso sem que eu precise reinstalar o Ubuntu novamente? Por favor, ajude.
Responder1
Parece que há um bug no script perl c_rehash (estou recebendo erros semelhantes e encontrei esta discussão:https://aur.archlinux.org/packages/icaclient/?comments=all). Em /bin/c_rehash no meu sistema (archlinux, parece que o seu está em /usr/bin/c_rehash) faltam algumas aspas. Eu tive que mudar isso (perto do topo do arquivo):
my $dir = /etc/ssl;
my $prefix = /usr;
para:
my $dir = "/etc/ssl";
my $prefix = "/usr";
e então funcionou.
Responder2
No meu caso, um fechamento incorreto da configuração dos certificados ca levou a um arquivo corrompido. Reinstalar/atualizar o 'debconf' resolveu meu problema:
sudo apt-get install debconf