Pamac Cannot Update. Error Setting Certificate

This one? Maybe? :face_with_peeking_eye:

You can also just click on the huge green address in your post above.

Thanks. Please explain what I am to do with the link you provided.

That link comes from the curl command you could not run for some reason.
Paste in browser address bar and it will fetch that program (pacman-static)
you then make it executable and run it.

The plan apparently was to use this instead of the regular pacman.
I don’t quite know why.



don’t unpack it if you want to install it.
to install it:
sudo pacman -U ca-certificates-20220905-1-any.pkg.tar.zst
(you need to give the PATH to where the file actually is)

As it has been a certificates issue, I was not able to have pacman access the internet, hence the following returned:

[Downloads]# pacman -U ca-certificates-20220905-1-any.pkg.tar.zst
loading packages...
resolving dependencies...
looking for conflicting packages...

Packages (2) ca-certificates-mozilla-3.96.1-1  ca-certificates-20220905-1

Total Download Size:   0.36 MiB
Total Installed Size:  0.98 MiB

:: Proceed with installation? [Y/n] y
:: Retrieving packages...
 ca-certificates-mozilla-3.96.1-1-x86_64.pkg.tar.zst failed to download
error: failed retrieving file 'ca-certificates-mozilla-3.96.1-1-x86_64.pkg.tar.zst' from mirror.is.co.za : error setting certificate file: /etc/ssl/certs/ca-certificates.crt
error: failed retrieving file 'ca-certificates-mozilla-3.96.1-1-x86_64.pkg.tar.zst' from mirror.i3d.net : error setting certificate file: /etc/ssl/certs/ca-certificates.crt
error: failed retrieving file 'ca-certificates-mozilla-3.96.1-1-x86_64.pkg.tar.zst' from mirror.smith.geek.nz : Could not resolve host: mirror.smith.geek.nz
warning: too many errors from mirror.smith.geek.nz, skipping for the remainder of this transaction
error: failed retrieving file 'ca-certificates-mozilla-3.96.1-1-x86_64.pkg.tar.zst' from archmirror1.octyl.net : The requested URL returned error: 404
warning: failed to retrieve some files
error: failed to commit transaction (failed to retrieve some files)
Errors occurred, no packages were upgraded.

Executed the file ‘pacman-static’.

Returned:

# ./pacman-static
warning: config file /etc/pacman.conf, line 20: directive 'SyncFirst' in section 'options' not recognized.
error: no operation specified (use -h for help)

Btw, Line 20 in pacman.conf:

SyncFirst    = manjaro-system archlinux-keyring manjaro-keyring

Did you actually read what he said to run? Also please read how to post output text: [HowTo] Post command output and file content as formatted text

I thought I did. Made pacman-static executable and ran it. Posted the result above.

Thanks for pointing me to read how to post output text.

You did not give the PATH to your file, the one you already have.
Only you know where it is on your computer - likely in the ~/Downloads folder.
There is no way for me to know …

Because you did not give the PATH to your file, pacman tries to download it again - and fails.



You should probably refresh your mirror list.
That by itself may already solve your problem.



You have to tell pacman (pacman-static, in this case) what you want it to do.
just
pacman
or
pacman-static
without any options
won’t do anything

The ‘pacman -U’ command was actually issued within the ‘Downloads’ folder where the said file resides.

And after making the ‘pacman-static’ file executable, I did not know what options to include. I have no idea, my ignorance.

What options besides:

./pacman-static

Read the 4th post.

[Downloads]# ./pacman-static -Syu
warning: config file /etc/pacman.conf, line 20: directive 'SyncFirst' in section 'options' not recognized.
:: Synchronizing package databases...
 core.db failed to download
error: failed retrieving file 'core.db' from mirror.is.co.za : error setting certificate verify locations:  CAfile: /etc/ssl/certs/ca-certificates.crt CApath: none
error: failed retrieving file 'core.db' from mirror.i3d.net : error setting certificate verify locations:  CAfile: /etc/ssl/certs/ca-certificates.crt CApath: none
error: failed retrieving file 'core.db' from mirror.smith.geek.nz : Could not resolve host: mirror.smith.geek.nz
warning: too many errors from mirror.smith.geek.nz, skipping for the remainder of this transaction
error: failed retrieving file 'core.db' from archmirror1.octyl.net : The requested URL returned error: 404
error: failed to synchronize all databases (failed to retrieve some files)

Same problem because ‘-Syu’ would require accessing the internet which was the issue from the beginning if without a functional ca.certificates.crt, no?

Please post

ls -a /etc/ssl/certs/ca-certificates.crt
ls -a /etc/ca-certificates/extracted/tls-ca-bundle.pem

Also

Now get ca-certificates-mozilla the same way and retry.

for me, that would for example be:
sudo pacman-mirrors -c Germany

use it like it is for now - it is good enough even if you are in Australia or NZ or RSA :wink:
or put your own country or other options

At least it will surely be different from what you have now.

Check if they’re in your package cache:

ls /var/cache/pacman/pkg | grep ca-cert

If so, try installing them:

sudo pacman -U /var/cache/pacman/pkg/ca-certificates-mozilla-3.96.1-1-x86_64.pkg.tar.zst  /var/cache/pacman/pkg/ca-certificates-20220905-1-any.pkg.tar.zst

Otherwise:

# ls -a /etc/ssl/certs/ca-certificates.crt
ls -a /etc/ca-certificates/extracted/tls-ca-bundle.pem
/etc/ssl/certs/ca-certificates.crt
/etc/ca-certificates/extracted/tls-ca-bundle.pem
Downloads]# pacman -U ca-certificates-mozilla-3.98-1-x86_64.pkg.tar.zst
loading packages...
resolving dependencies...
looking for conflicting packages...

Packages (1) ca-certificates-mozilla-3.98-1

Total Installed Size:  1.01 MiB

:: Proceed with installation? [Y/n] y
(1/1) checking keys in keyring                                                                       [###########################################################] 100%
(1/1) checking package integrity                                                                     [###########################################################] 100%
(1/1) loading package files                                                                          [###########################################################] 100%
(1/1) checking for file conflicts                                                                    [###########################################################] 100%
(1/1) checking available disk space                                                                  [###########################################################] 100%
:: Processing package changes...
(1/1) installing ca-certificates-mozilla                                                             [###########################################################] 100%
:: Running post-transaction hooks...
(1/2) Arming ConditionNeedsUpdate...
(2/2) Rebuilding certificate stores...

What do I do next?

Actually, I had already done that and additionally added some mirrors into pacman.conf file. See the contents below of pacman.conf:

#
# /etc/pacman.conf
#
# See the pacman.conf(5) manpage for option and repository directives

#
# GENERAL OPTIONS
#
[options]
# The following paths are commented out with their default values listed.
# If you wish to use different paths, uncomment and update the paths.
#RootDir     = /
#DBPath      = /var/lib/pacman/
CacheDir = /var/cache/pacman/pkg/
#LogFile     = /var/log/pacman.log
#GPGDir      = /etc/pacman.d/gnupg/
#HookDir     = /etc/pacman.d/hooks/
HoldPkg      = pacman glibc manjaro-system
# If upgrades are available for these packages they will be asked for first
SyncFirst    = manjaro-system archlinux-keyring manjaro-keyring
#XferCommand = /usr/bin/curl -C - -f %u > %o
#XferCommand = /usr/bin/wget --passive-ftp -c -O %o %u
#CleanMethod = KeepInstalled
#UseDelta    = 0.7
Architecture = auto

#IgnorePkg   =
#IgnorePkg   =
#IgnoreGroup =

#NoUpgrade   =
#NoExtract   =

# Misc options
#UseSyslog
#Color
#TotalDownload
# We cannot check disk space from within a chroot environment
CheckSpace
#VerbosePkgLists

# By default, pacman accepts packages signed by keys that its local keyring
# trusts (see pacman-key and its man page), as well as unsigned packages.
SigLevel    = Required DatabaseOptional
LocalFileSigLevel = Optional
#RemoteFileSigLevel = Required

# NOTE: You must run `pacman-key --init` before first using pacman; the local
# keyring can then be populated with the keys of all official Manjaro Linux
# packagers with `pacman-key --populate archlinux manjaro`.

#
# REPOSITORIES
#   - can be defined here or included from another file
#   - pacman will search repositories in the order defined here
#   - local/custom mirrors can be added here or in separate files
#   - repositories listed first will take precedence when packages
#     have identical names, regardless of version number
#   - URLs will have $repo replaced by the name of the current repo
#   - URLs will have $arch replaced by the name of the architecture
#
# Repository entries are of the format:
#       [repo-name]
#       Server = ServerName
#       Include = IncludePath
#
# The header [repo-name] is crucial - it must be present and
# uncommented to enable the repo.
#

# The testing repositories are disabled by default. To enable, uncomment the
# repo name header and Include lines. You can add preferred servers immediately
# after the header, and they will be used before the default mirrors.

[core]
SigLevel = PackageRequired
Include = /etc/pacman.d/mirrorlist
Server = https://mirror.i3d.net/pub/archlinux/
Server = http://mirror.smith.geek.nz/archlinux/
Server = http://archmirror1.octyl.net/

[extra]
SigLevel = PackageRequired
Include = /etc/pacman.d/mirrorlist
Server = https://mirror.i3d.net/pub/archlinux/
Server = http://mirror.smith.geek.nz/archlinux/
Server = http://archmirror1.octyl.net/

[community]
SigLevel = PackageRequired
Include = /etc/pacman.d/mirrorlist
Server = https://mirror.i3d.net/pub/archlinux/
Server = http://mirror.smith.geek.nz/archlinux/
Server = http://archmirror1.octyl.net/

# If you want to run 32 bit applications on your x86_64 system,
# enable the multilib repositories as required here.

[multilib]
SigLevel = PackageRequired
Include = /etc/pacman.d/mirrorlist
Server = https://mirror.i3d.net/pub/archlinux/
Server = http://mirror.smith.geek.nz/archlinux/
Server = http://archmirror1.octyl.net/

# An example of a custom package repository.  See the pacman manpage for
# tips on creating your own repositories.
#[custom]
#SigLevel = Optional TrustAll
#Server = file:///home/custompkgs

Thats all sorts of broken.

You shouldnt have those extra Server lines for any of the repos

Probably especially not pointing at ‘archlinux’ repos

The [community] repo has been defunct for quite some time now

And that probably also means you have other unmanaged pacnews in general.

(print them all with pacdiff -o)

2 Likes

Install ca-certificates--20220905-1 as in post #15. And learn how things work. Otherwise Manjaro isn’t for you.

… and those are exactly the servers for which you keep getting errors, for which everything keeps failing.
Remove the community repo and all of the “Server” lines from that file like @cscs said.
You shot yourself in the foot with this one and it took until now to find out.

1 Like

Frankly, the errors were all there before I added any extra servers. Nothing different after adding those servers. [Your assumption is not correct}

I have searched on the internet and tried a number of different things for a long time now but have not found the solution to the issues. I am learning bit by bit but still far from understanding how to work it out.

Appreciate your patience.