
Estaba intentando instalar un certificado SSL autofirmado con sudo dpkg-reconfigure ca-certificates
un comando, pero antes de que pudiera terminar, mi computadora se reinició debido a un corte de energía.
Ahora, cuando ejecuto sudo dpkg-reconfigure ca-certificates
el comando, aparece el siguiente error:
sudo dpkg-reconfigure ca-certificates
/usr/sbin/dpkg-reconfigure: ca-certificates is broken or not fully installed
Cuando lo intento sudo update-ca-certificates
, obtengo los siguientes errores:
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.
Cuando intento sudo apt install ca-certificates -f
, obtengo los siguientes errores:
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)
Debido a esto, ni siquiera puedo enviar mi trabajo al repositorio de Git. Recibo el siguiente error cuando intento hacerlo:
fatal: unable to access 'https://github.com/***/***-tdd.git/': Problem with the SSL CA cert (path? access rights?)
¿Alguien sabe cómo solucionar este problema sin tener que reinstalar Ubuntu nuevamente? Por favor ayuda.
Respuesta1
Parece que hay un error en el script perl c_rehash (recibo errores similares y encontré esta discusión:https://aur.archlinux.org/packages/icaclient/?comments=all). En /bin/c_rehash en mi sistema (archlinux, parece que el tuyo está en /usr/bin/c_rehash) faltan algunas comillas. Tuve que cambiar esto (cerca de la parte superior del archivo):
my $dir = /etc/ssl;
my $prefix = /usr;
a:
my $dir = "/etc/ssl";
my $prefix = "/usr";
y luego funcionó.
Respuesta2
En mi caso, un cierre incorrecto de la configuración de certificados ca provocó un archivo roto. Reinstalar/actualizar 'debconf' resolvió mi problema:
sudo apt-get install debconf