Error message: SSL certificate problem: unable to get local issuer certificate on OpenSUSE

I type zypper up or zypper dup and I get stuck at TLS/SSL error:

Retrieving: iproute2-5.3-5.5.1.x86_64.rpm ....................[error (339 B/s)]
Download (curl) error for 'http://download.opensuse.org/update/leap/15.3/sle/x86_64/iproute2-5.3-5.5.1.x86_64.rpm':
Error code: Curl error 60
Error message: SSL certificate problem: unable to get local issuer certificate

Abort, retry, ignore? [a/r/i/...? shows all options] (a): r
Retrieving: iproute2-5.3-5.5.1.x86_64.rpm ..........................................[error]
Download (curl) error for 'http://download.opensuse.org/update/leap/15.3/sle/x86_64/iproute2-5.3-5.5.1.x86_64.rpm':
Error code: Curl error 60
Error message: SSL certificate problem: unable to get local issuer certificate

Abort, retry, ignore? [a/r/i/...? shows all options] (a): 

How can I fix “Error code: Curl error 60. Error message: SSL certificate problem: unable to get local issuer certificate” on OpenSUSE Linux?

Make sure you have the root certificate bundles installed and updated.

Step 1. List the current root certificate on OpenSUSE

Run:

zypper search  ca-certificates
zypper search -i ca-certificates
Loading repository data...
Reading installed packages...

S | Name                    | Summary                                             | Type
--+-------------------------+-----------------------------------------------------+--------
i | ca-certificates         | Utilities for system wide CA certificate installa-> | package
i | ca-certificates-mozilla | CA certificates for OpenSSL                         | package

Step 2. Update CA certificate

Again run as root user:

update-ca-certificates

OR

zypper up ca-certificates ca-certificates-mozilla
Loading repository data...
Reading installed packages...
No update candidate for 'ca-certificates-2+git20210309.21162a6-2.1.noarch'. The highest available version is already installed.
Resolving package dependencies...

The following package is going to be upgraded:
  ca-certificates-mozilla

1 package to upgrade.
Overall download size: 344.5 KiB. Already cached: 0 B. After the operation, 4.9 KiB will be
freed.
Continue? [y/n/v/...? shows all options] (y): y
Retrieving package ca-certificates-mozilla-2.44-21.1.noarch
                                                      (1/1), 344.5 KiB (923.7 KiB unpacked)
Retrieving: ca-certificates-mozilla-2.44-21.1.noarch.rpm ............................[done]

Checking for file conflicts: ........................................................[done]
(1/1) Installing: ca-certificates-mozilla-2.44-21.1.noarch ..........................[done]
Executing %posttrans scripts ........................................................[done]

Step 3. Refresh repos

Execute:

zypper ref -s

Step 4. Update or install new packages as usual

Type:

zypper dup

OR

zypper up

It should work now.

The solution worked it. Never think of updating package.

The update-ca-certificates command works on other Linux distros to update /etc/ssl/certs and ca-certificates.crt.


Linux sysadmin blog - Linux/Unix Howtos and Tutorials - Linux bash shell scripting wiki