Hello,
I have 5 CachyOS systems here, my main system and 4 virtual machines (VirtualBox).
I keep having problems like this, especially on the virtual machines:
cachyos: signature from "CachyOS <admin@cachyos.org>" is unknown trust
On my main system I only had the problem once at the very beginning when installing, and not again after that. I don’t remember exactly how I managed to remedy the situation (but most likely with one of the commands mentioned below).
Things initially ran fine on my VMs, but then the error gradually appeared in one or another VM.
Mainly I’m trying to update in the VMs with Pamac (GUI), mainly just to see how it works! And then things quickly stop working with Pamac.
Currently (and using this as an example) I have the problem again quite stubbornly in a VM (while, strangely enough, another VM was also able to be updated without any problems today).
This time I wanted to start the update directly via yay.
Unfortunately, my system was set to German at the time of the update and therefore the output in the terminal is also partly in German.
Well, what to do now? Leave it in German (so as not to distort it) and hope that it will still be understood (ptr1337 can at least speak German)?
I decided to run at least the shorter versions through Google Translate (which is why one or two expressions may not fit correctly!):
❯ yay -Syu
[sudo] password for xxx:
Warning: Public keyring not found; have you run 'pacman-key --init'?
Error: cachyos: Key "882DCFE48E2051D48E2562ABF3B607488DB35A47" is unknown
Error: Keychain cannot be written
:: Package databases are synchronized...
cachyos 392.9 KiB 1584 KiB/s 00:00 [------------------------------------------------ -------] 100%
core is current
extra is current
multilib 141.7 KiB 644 KiB/s 00:00 [------------------------------------------------ -------] 100%
Error: cachyos: Key "882DCFE48E2051D48E2562ABF3B607488DB35A47" is unknown
Error: Keychain cannot be written
Error: No database could be synchronized (Unexpected error)
-> Error updating databases - exit status 1
Since yay kindly suggested ‘pacman-key –init’ to me, I thought I’d try it out:
❯ sudo pacman-key --init
==> Generate Pacman master key. May take a while.
gpg: Generating pacman keyring master key...
gpg: Revocation certificate saved as '/etc/pacman.d/gnupg/openpgp-revocs.d/6ECE5B1094C95BC5E2D5E5F7DB85C2C4F0487966.rev'.
gpg: Done
==> Update trust database...
gpg: public key of ultimate trusted key CC93EE25930036C2 not found
gpg: marginals needed: 3 completes needed: 1 trust model: pgp
gpg: depth: 0 valid: 2 signed: 0 confidence: 0-, 0q, 0n, 0m, 0f, 2u
==> ERROR: Unable to update trust database.
Then I tried out a few commands that I had put together here in a similar context:
❯ sudo pacman -Sy archlinux-keyring
Error: cachyos: Key "882DCFE48E2051D48E2562ABF3B607488DB35A47" is unknown
::Import PGP key 882DCFE48E2051D48E2562ABF3B607488DB35A47? [Y/n] j
Error: cachyos: signature from "CachyOS <admin@cachyos.org>" is unknown trust
:: Package databases are synchronized...
cachyos 392.9 KiB 1723 KiB/s 00:00 [------------------------------------------------ -------] 100%
core 130.2 KiB 486 KiB/s 00:00 [------------------------------------------------ -------] 100%
extra is current
multilib is up to date
Error: cachyos: signature from "CachyOS <admin@cachyos.org>" is unknown trust
Error: No database could be synchronized (Unexpected error)
I no longer have the terminal output from the next command, so I’ll write it shortened like this:
sudo pacman-key --refresh-keys
-> cachyos: signature from “CachyOS admin@cachyos.org” is unknown trust
And I tried one more command:
sudo pacman-key --lsign-key cachyos
-> Sign key 1 locally...
==> Update trust database...
gpg: public key of ultimate trusted key CC93EE25930036C2 not found
gpg: marginals needed: 3 completes needed: 1 trust model: pgp
gpg: depth: 0 valid: 2 signed: 1 confidence: 0-, 0q, 0n, 0m, 0f, 2u
gpg: depth: 1 valid: 1 signed: 0 confidence: 1-, 0q, 0n, 0m, 0f, 0u
==> ERROR: Unable to update trust database.
Every now and then I restarted (in case the commands need a restart to work).
Then I just tried an update (sudo pacman -Syu) again:
Here is a shortened translation into English (from where the update got strange!):
(The entire terminal output has no space here either, as the post is limited to I think 65,000 characters.)
...
...
...
Required keys are downloaded...
:: Import PGP key 76A5EF9054449A5C, "Pierre Schmitz <pierre@archlinux.org>"? [Y/n] y
:: Import PGP key 06096A6AD1CEDDAC, "Laurent Carlier <lordheavym@archlinux.org>"? [Y/n] y
:: Import PGP key 771DF6627EDF681F, "Tobias Powalowski <tpowa@archlinux.org>"? [Y/n]yj
:: Import PGP key 6D42BDD116E0068F, "Christian Hesse <eworm@archlinux.org>"? [Y/n] y
:: Import PGP key B02854ED753E0F1F, "Anatol Pomozov <anatolik@archlinux.org>"? [Y/n] y
:: Import PGP key 9D4C5AA15426DA0A, "Frederik Schwan <freswa@archlinux.org>"? [Y/n] y
:: Import PGP key E0959FEA8B550539, "George Rawlinson <grawlinson@archlinux.org>"? [Y/n]y
:: Import PGP key C32217F6F13FF192, "Alexander F. Rødseth <xyproto@archlinux.org>"? [Y/n]y
:: PGP key F296BDE50368C6CE, »T.J. Townsend <blakkheim@archlinux.org>« import? [Y/n] y
(11/88) Packet integrity is checked [c o o o o o o o o o o o o o o ] 2(88/88) Packet integrity is checked [------------- --------------------] 100%
Error: zlib: signature from "Levente Polyak <anthraxx@archlinux.org>" is unknown trust
:: File /var/cache/pacman/pkg/zlib-1:1.3-2-x86_64.pkg.tar.zst is corrupted (Invalid or corrupted package (PGP signature)).
Should the file be removed? [Y/n] y
...
...
...
Error: The operation could not be performed (Invalid or corrupted package (PGP signature))
Errors occurred, no packages were updated.
You have to confirm all 88 packages (I think it said 88 somewhere) individually with yes or no. In the above case I confirmed everything with Yes. But even if I confirm everything with no, it doesn’t work.
When I try to update again, I currently don’t get the error message again: cachyos: signature from "CachyOS <admin@cachyos.org>" is unknown trust
.
But the last mentioned error, where I have to confirm each package individually with yes or no.
Now I don’t know what to do anymore! 🙁