pve下lxc运行archlinux

pve自带的archlinux的 CT模板 会延迟几个月,archlinux因为是滚动更新,直接使用会无法正常更新。
在 梦中大佬指点搞定

# 准备ct模板

选择 archlinux-base_20221111-1_amd64.tar.zst 。现在是2023 02 15,直接更新会出错。

# 修改源

1
nano /etc/pacman.d/mirrorlist

在最前面添加一行,后面的不要删除。

1
Server = https://mirrors.tuna.tsinghua.edu.cn/archlinux/$repo/os/$arch

# 开始更新

更新

1
pacman -Syy

继续

1
pacman -Su

出错,按照提示

1
pacman-key --init

继续

1
2
3
pacman-key --populate #Reload the default keys from the (given) keyrings
pacman -S archlinux-keyring
pacman -Su archlinux-keyring

搞定,可以继续装其他软件了。

# 总结

首先要 初始化key后需要 然后 从密钥环中重新加载默认密钥,最后先单独装keyring 再更新

Licensed under CC BY-NC-SA 4.0
comments powered by Disqus
使用 Hugo 构建
主题 StackJimmy 设计