blob: cd9f93eb46f1e2796cc6d9d18975c1985ef2fbcc (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
|
---
title: "When pacman says \"error: required key missing from keyring\""
date: 2020-10-20T08:02:14+05:30
lastmod: 2022-04-06T08:02:14+05:30
draft: false
keywords: [pacman]
description: ""
tags: [pacman]
categories: [linux]
author: ""
# You can also close(false) or open(true) something for this content.
# P.S. comment can only be closed
comment: false
toc: false
autoCollapseToc: false
postMetaInFooter: true
hiddenFromHomePage: false
# You can also define another contentCopyright. e.g. contentCopyright: "This is another copyright."
contentCopyright: false
reward: false
mathjax: false
mathjaxEnableSingleDollar: false
mathjaxEnableAutoNumber: false
# You unlisted posts you might want not want the header or footer to show
hideHeaderAndFooter: false
# You can enable or disable out-of-date content warning for individual post.
# Comment this out to use the global config.
#enableOutdatedInfoWarning: false
flowchartDiagrams:
enable: false
options: ""
sequenceDiagrams:
enable: false
options: ""
---
<!--more-->
```
warning: Public keyring not found; have you run 'pacman-key --init'?
downloading required keys...
error: keyring is not writable
error: required key missing from keyring
error: failed to commit transaction (could not find or read file)
Errors occurred, no packages were upgraded.
```
This is what happened when I ran `pacman -S zsh` on my new WSL2 install.
I wasted a lot of time trying to fix this thing. I'll jump to the conclusion so you don't have to waste your time too. Entering these (as root) worked for me.
```
rm -r /etc/pacman.d/gnupg/
pacman-key --init
pacman-key --populate archlinux
pacman -Sc
pacman -Syyu
```
Read the thread here: https://bbs.archlinux32.org/viewtopic.php?id=522&p=2
|