Signature is invalid

Error I get with pamac update:

Checking keyring...                                                                                                                                                [115/115]
Checking integrity...                                                                                                                                              [115/115]
Error: cantarell-fonts: signature from "Jan Alexander Steffens (heftig) <jan.steffens@gmail.com>" is invalid
Error: pango: signature from "Jan Alexander Steffens (heftig) <jan.steffens@gmail.com>" is invalid
Removing invalid files and retrying...
Resolving dependencies...

Please see:
https://wiki.manjaro.org/index.php/Pacman_troubleshooting#Errors_about_Keys

More errors:

sudo pacman -Sy gnupg archlinux-keyring manjaro-keyring
:: Synchronizing package databases...
 core is up to date
 extra is up to date
 community is up to date
 multilib is up to date
warning: gnupg-2.2.32-2 is up to date -- reinstalling
warning: archlinux-keyring-20211028-1 is up to date -- reinstalling
warning: manjaro-keyring-20210910-2 is up to date -- reinstalling
resolving dependencies...
looking for conflicting packages...

Packages (3) archlinux-keyring-20211028-1  gnupg-2.2.32-2  manjaro-keyring-20210910-2

Total Installed Size:  11.49 MiB
Net Upgrade Size:       0.00 MiB

:: Proceed with installation? [Y/n] Y
(3/3) checking keys in keyring                                                                                                                 [########################################################################################] 100%
downloading required keys...
:: Import PGP key 51E8B148A9999C34, "Evangelos Foutras <foutrelis@archlinux.org>"? [Y/n] Y
:: Import PGP key 6D42BDD116E0068F, "Christian Hesse <arch@eworm.de>"? [Y/n] Y
:: Import PGP key DAD3B211663CA268, "Bernhard Landauer <oberon@manjaro.org>"? [Y/n] Y
(3/3) checking package integrity                                                                                                               [########################################################################################] 100%
error: gnupg: signature from "Evangelos Foutras <foutrelis@archlinux.org>" is unknown trust
:: File /var/cache/pacman/pkg/gnupg-2.2.32-2-x86_64.pkg.tar.zst is corrupted (invalid or corrupted package (PGP signature)).
Do you want to delete it? [Y/n] Y
error: archlinux-keyring: signature from "Christian Hesse (Arch Linux Package Signing) <arch@eworm.de>" is unknown trust
:: File /var/cache/pacman/pkg/archlinux-keyring-20211028-1-any.pkg.tar.zst is corrupted (invalid or corrupted package (PGP signature)).
Do you want to delete it? [Y/n] Y
error: manjaro-keyring: signature from "Bernhard Landauer <bernhard@manjaro.org>" is unknown trust
:: File /var/cache/pacman/pkg/manjaro-keyring-20210910-2-any.pkg.tar.zst is corrupted (invalid or corrupted package (PGP signature)).
Do you want to delete it? [Y/n] Y
error: failed to commit transaction (invalid or corrupted package (PGP signature))
Errors occurred, no packages were upgraded.

I get errors please help:

[manjaro ~]# rm -r /etc/pacman.d/gnupg
[manjaro ~]# pacman -Sy gnupg archlinux-keyring manjaro-keyring
:: Synchronizing package databases...
 core is up to date
 extra is up to date
 community is up to date
 multilib is up to date
warning: gnupg-2.2.32-2 is up to date -- reinstalling
warning: archlinux-keyring-20211028-1 is up to date -- reinstalling
warning: manjaro-keyring-20210910-2 is up to date -- reinstalling
resolving dependencies...
looking for conflicting packages...

Packages (3) archlinux-keyring-20211028-1  gnupg-2.2.32-2  manjaro-keyring-20210910-2

Total Installed Size:  11.49 MiB
Net Upgrade Size:       0.00 MiB

:: Proceed with installation? [Y/n] Y
(3/3) checking keys in keyring                                                                                                                 [########################################################################################] 100%
warning: Public keyring not found; have you run 'pacman-key --init'?
downloading required keys...
error: keyring is not writable
error: keyring is not writable
error: keyring is not writable
error: required key missing from keyring
error: failed to commit transaction (unexpected error)
Errors occurred, no packages were upgraded.

Trible, you have 1 hour? (20-30 minutes of pure time)? We will resolve this interactively. Of not I will be unable to help you in future, but I believe some will do it after some time.

1 Like

no problem I have the time.

Let’s start. I typing now…

1 Like

ok im waiting


Let’s recreate all keys from the scratch:

  1. We will remove all junk keys/files you have.
  2. We will add temporary keys.
  3. We will install fresh packages.
  4. Will remove temp keys and install all keys from both Archlinux and Manjaro jeyring into you local machine keyring.

1st Stage:

Enter this:

sudo pacman -Scc

answer y everywhere.
Then

sudo rm -r /etc/pacman.d/gnupg

Then

sudo rm /usr/share/pacman/keyrings/*

Show the output of:

ls -A1 /usr/share/pacman/keyrings/*

is it empty?

this is the output:

~ 
❯ sudo pacman -Scc

Cache directory: /var/cache/pacman/pkg/
:: Do you want to remove ALL files from cache? [y/N] y
removing all files from cache...

Database directory: /var/lib/pacman/
:: Do you want to remove unused repositories? [Y/n] Y
removing unused sync repositories...

~ 
❯ sudo rm -r /etc/pacman.d/gnupg

~ 
❯ sudo rm /usr/share/pacman/keyrings/*

~ 
❯ ls -A1 /usr/share/pacman/keyrings/*
ls: cannot access '/usr/share/pacman/keyrings/*': No such file or directory

a bit correction:
show the

ls -A1 /usr/share/pacman/keyrings/

please

no output

❯ ls -A1 /usr/share/pacman/keyrings/

~ 
❯

Empty. good.

sudo pacman-mirrors --api --set-branch stable --proto https --country Germany

I know, you could be not in Germany, but to be sure please switch known-to-be-many-and-good servers. later we will switch back to country you prefer.

works

❯ sudo pacman-mirrors --api --set-branch stable --proto https --country Germany
::INFO Branch in config is changed
::INFO Protocols in config is changed
::INFO Downloading mirrors from Manjaro
::INFO => Mirror pool: https://repo.manjaro.org/mirrors.json
::INFO => Mirror status: https://repo.manjaro.org/status.json
::INFO User generated mirror list
::------------------------------------------------------------
::INFO Custom mirror file saved: /var/lib/pacman-mirrors/custom-mirrors.json
::INFO Using custom mirror file
::INFO Querying mirrors - This may take some time
  0.423 Germany        : https://mirror.alpix.eu/manjaro/
  0.498 Germany        : https://ftp.gwdg.de/pub/linux/manjaro/
  0.380 Germany        : https://mirror.23m.com/manjaro/
  0.465 Germany        : https://ftp.halifax.rwth-aachen.de/manjaro/
  0.388 Germany        : https://mirror.netcologne.de/manjaro/
  0.337 Germany        : https://manjaro.moson.eu/
  0.418 Germany        : https://mirror.moson.org/manjaro/
::INFO Writing mirror list
::Germany         : https://manjaro.moson.eu/stable/$repo/$arch
::Germany         : https://mirror.23m.com/manjaro/stable/$repo/$arch
::Germany         : https://mirror.netcologne.de/manjaro/stable/$repo/$arch
::Germany         : https://mirror.moson.org/manjaro/stable/$repo/$arch
::Germany         : https://mirror.alpix.eu/manjaro/stable/$repo/$arch
::Germany         : https://ftp.halifax.rwth-aachen.de/manjaro/stable/$repo/$arch
::Germany         : https://ftp.gwdg.de/pub/linux/manjaro/stable/$repo/$arch
::INFO Mirror list generated and saved to: /etc/pacman.d/mirrorlist
::INFO To reset custom mirrorlist 'sudo pacman-mirrors -id'
::INFO To remove custom config run  'sudo pacman-mirrors -c all'

Got several servers?
Saw it. Perfect.

No need to post output. I will ask you if it need, just in case do not clear the console content for now.

Stage 2.

sudo pacman-key --init 

show the

sudo pacman-key --list-keys
❯ sudo pacman-key --list-keys
/etc/pacman.d/gnupg/pubring.gpg
-------------------------------
pub   rsa4096 2021-12-13 [SC]
      62A92437D369669F42769F21BB4F8CD2236D1088
uid           [ultimate] Pacman Keyring Master Key <pacman@localhost>

Perfect

sudo pacman -Sy manjaro-keyring archlinux-keyring

press y there to import 2 PGP keys.
After that you will see the prompt to save or to remove the packages, not matter you answer y/n there.

Got errors again, what do I answer?

❯ sudo pacman -Sy manjaro-keyring archlinux-keyring
:: Synchronizing package databases...
 core is up to date
 extra is up to date
 community is up to date
 multilib is up to date
warning: manjaro-keyring-20210910-2 is up to date -- reinstalling
warning: archlinux-keyring-20211028-1 is up to date -- reinstalling
resolving dependencies...
looking for conflicting packages...

Packages (2) archlinux-keyring-20211028-1  manjaro-keyring-20210910-2

Total Download Size:   1.09 MiB
Total Installed Size:  1.53 MiB
Net Upgrade Size:      0.00 MiB

:: Proceed with installation? [Y/n] Y
:: Retrieving packages...
 archlinux-keyring-20211028-1-any                                           979.1 KiB  2.17 MiB/s 00:00 [#############################################################] 100%
 manjaro-keyring-20210910-2-any                                             141.6 KiB  1839 KiB/s 00:00 [#############################################################] 100%
 Total (2/2)                                                               1120.7 KiB  1837 KiB/s 00:01 [#############################################################] 100%
(2/2) checking keys in keyring                                                                          [#############################################################] 100%
downloading required keys...
:: Import PGP key DAD3B211663CA268, "Bernhard Landauer <oberon@manjaro.org>"? [Y/n] Y
:: Import PGP key 6D42BDD116E0068F, "Christian Hesse <arch@eworm.de>"? [Y/n] Y
(2/2) checking package integrity                                                                        [#############################################################] 100%
error: manjaro-keyring: signature from "Bernhard Landauer <bernhard@manjaro.org>" is unknown trust
:: File /var/cache/pacman/pkg/manjaro-keyring-20210910-2-any.pkg.tar.zst is corrupted (invalid or corrupted package (PGP signature)).
Do you want to delete it? [Y/n]

it is ok to get those error on that stage, I promise you.

do I answer yes or no?