Fehler: CA-Zertifikate sind defekt oder nicht vollständig installiert

Fehler: CA-Zertifikate sind defekt oder nicht vollständig installiert

Ich habe versucht, mit einem Befehl ein selbstsigniertes SSL-Zertifikat zu installieren, sudo dpkg-reconfigure ca-certificatesaber bevor der Vorgang abgeschlossen werden konnte, wurde mein Computer aufgrund eines Stromausfalls zurückgesetzt.

Wenn ich jetzt sudo dpkg-reconfigure ca-certificatesden Befehl ausführe, erhalte ich folgenden Fehler:

sudo dpkg-reconfigure ca-certificates
/usr/sbin/dpkg-reconfigure: ca-certificates is broken or not fully installed

Beim Versuch sudo update-ca-certificateserhalte ich folgende Fehlermeldungen:

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.

Wenn ich sudo versuche apt install ca-certificates -f, erhalte ich folgende Fehler:

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)

Aus diesem Grund kann ich meine Arbeit nicht einmal in das Git-Repository übertragen. Wenn ich dies versuche, erhalte ich die folgende Fehlermeldung:

fatal: unable to access 'https://github.com/***/***-tdd.git/': Problem with the SSL CA cert (path? access rights?)

Weiß jemand, wie ich das beheben kann, ohne dass ich Ubuntu noch einmal komplett neu installieren muss? Bitte helfen Sie.

Antwort1

Es sieht so aus, als ob es einen Fehler im Perl-Skript c_rehash gibt (ich bekomme ähnliche Fehler und habe diese Diskussion gefunden:https://aur.archlinux.org/packages/icaclient/?comments=all). In /bin/c_rehash auf meinem System (Archlinux, Ihres scheint in /usr/bin/c_rehash zu sein) fehlen einige Anführungszeichen. Ich musste dies ändern (nahe am Anfang der Datei):

my $dir = /etc/ssl;
my $prefix = /usr;

Zu:

my $dir = "/etc/ssl";
my $prefix = "/usr";

und dann hat es geklappt.

Antwort2

In meinem Fall führte ein falsches Schließen des CA-Zertifikat-Setups zu einer beschädigten Datei. Das Neuinstallieren/Aktualisieren von „debconf“ löste mein Problem:

sudo apt-get install debconf

verwandte Informationen