1. 程式人生 > >Errors occured, no packages were upgraded. ⇒ ERROR: Failed to install packages to new root.

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

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