Errors occured, no packages were upgraded. ⇒ ERROR: Failed to install packages to new root.

LZ installing archlinux with virtualbox. Archwiki installing

according to the official document to execute (before executing the command, it is better to go to /etc/pacman.d/mirrorlist to change a faster source to copy the following Server template, change the middle http://mirrors.163.com/ after the same as the template)

pacstrap -i /mnt base base-devel

will throw an error

after executing this command

Errors occured, no packages were upgraded. 
⇒ ERROR: Failed to install packages to new root.

after all kinds of methods can not be solved (all are all kinds of post bar big hand reply, today suddenly noticed is someone answered the correct method, there is a solution in pacman, did not see.) The second page to find a solution, of course, this method may not be universal, but also post bar reply method only for I did not
the solution is as follows, execute the command

pacman-key --refresh-keys

官方文档如下(不愧是archwiki)

注意:archlinux-keyring包是pacman的一个依赖项,它包含最新的密钥。但是,也可以使用pac -key -refresh-keys(作为根用户)手动更新密钥。在执行-refresh-keys时,您的本地密钥也将在远程keyserver上查找,并且您将收到一条关于未找到该密钥的消息。这没什么可担心的

好的,问题解决。重新执行

pacstrap -i /mnt base base-devel

Read More: