1

First of all, I got this error, E: Sub-process /usr/bin/dpkg returned an error code (1) because of some problems in package ca-certificates. Then finding this blog, it mentioned some methods. I used the first three methods.

After that, I found this question and tried to use its answers to fix my issue but fail. Sadly, third method " sudo apt-get --purge remove ca-certificates, I guess that it removes every file .crt.

When I follow this answer

The output: sudo cp foo.crt /usr/share/ca-certificates/extra/foo.crt is cp: cannot stat 'foo.crt': No such file or directory

No output for : locate foo.crt

More information about the system:

The output:

~$ uname -a
Linux redhwan 4.15.0-101-generic #102~16.04.1-Ubuntu SMP Mon May 11 11:38:16 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

The output:

~$ lsb_release -crid
Distributor ID: Ubuntu
Description:    Ubuntu 16.04.6 LTS
Release:    16.04
Codename:   xenial

The output:

~$ grep ' ' /etc/ca-certificates.conf
# This file lists certificates that you wish to use or to ignore to be
# installed in /etc/ssl/certs.
# update-ca-certificates(8) will update /etc/ssl/certs by reading this file.
# This is autogenerated by dpkg-reconfigure ca-certificates.
# Certificates should be installed under /usr/share/ca-certificates
# and files with extension '.crt' is recognized as available certs.
# line begins with # is comment.
# line begins with ! is certificate filename to be deselected.
!This is suroegin's package - sort

Then removed !This is suroegin's package - sort

The output:

~$ sudo dpkg --configure -a
Setting up ca-certificates (20190110~16.04.1) ...
Processing triggers for ca-certificates (20190110~16.04.1) ...
Updating certificates in /etc/ssl/certs...
W: /usr/share/ca-certificates/This not found, but listed in /etc/ca-certificates.conf.
W: /usr/share/ca-certificates/is not found, but listed in /etc/ca-certificates.conf.
W: /usr/share/ca-certificates/suroegin's not found, but listed in /etc/ca-certificates.conf.
W: /usr/share/ca-certificates/package not found, but listed in /etc/ca-certificates.conf.
W: /usr/share/ca-certificates/- not found, but listed in /etc/ca-certificates.conf.
W: /usr/share/ca-certificates/sort not found, but listed in /etc/ca-certificates.conf.
sed: can't read This is suroegin's package - sort: No such file or directory
dpkg: error processing package ca-certificates (--configure):
 subprocess installed post-installation script returned error exit status 2
Errors were encountered while processing:
 ca-certificates

and

~$ echo -e "4\n1\n3\n2" | sort
This is suroegin's package - sort

and

No output: sudo updatedb

and

~$ locate suroegin
/etc/ssl/certs/This_is_suroegin's_package_-_sort.pem

How to fix it?

REDHWAN
  • 193

0 Answers0