LZ用virtualbox安装archlinux,前面的分区什么的问题都是没有的,详情见archwiki安装
按照官方文档执行到(执行命令前,最好到/etc/pacman.d/mirrorlist换个快点的源 国内的话复制下面的Server模板,改一下中间的http://mirrors.163.com/后面跟模板一样)
pacstrap -i /mnt base base-devel
执行玩这个命令之后发现会抛出一个错误
Errors occured, no packages were upgraded.
⇒ ERROR: Failed to install packages to new root.
百度之后各种方法都不能解决(全是各种贴吧大手子的回复,今天突然注意到是有人回答正确方法的,pacman里面有解决办法,没有看到。。),心灰意冷还是上了Google,第二页找到解决办法,当然此方法可能并不通用,也可贴吧回复的方法只是针对我没用
解决办法如下,执行命令
pacman-key --refresh-keys
官方文档如下(不愧是archwiki)
Note: The archlinux-keyring package, which is a dependency of pacman, contains the latest keys. However keys can also be updated manually using pacman-key –refresh-keys (as root). While doing –refresh-keys, your local key will also be looked up on the remote keyserver, and you will receive a message about it being not found. This is nothing to be concerned about.
ok,问题解决。重新执行
pacstrap -i /mnt base base-devel