Arch Linux Troubleshooting
Pacman GPG key issues
If you run into an error like this:
error: ... "Levente Polyak (anthraxx) <levente@leventepolyak.net>" is unknown trust
Try refreshing they keyring for Arch and, if you are using Endeavour, also for Endeavour:
sudo pacman -Sy archlinux-keyring endeavouros-keyring
Then try to run pacman -Syu
again. If it still fails, try these:
sudo pacman-key --refresh sudo pacman-key --populate archlinux artix
If installing still fails with a similar error or you get a GPG error from the pacman-key
command you can try to initialise the key-ring.
sudo mv /etc/pacman.d/gnupg /etc/pacman.d/gnupg-backup sudo pacman-key --init sudo pacman-key --populate archlinux endeavouros artix ← only include Endeavour or Artix if applicable sudo pacman-key --refresh-keys
Then you could try updating/re-installing all the keyrings:
pacman -Ss keyring | grep installed sudo pacman -Sy archlinux-keyring gnome-keyring endeavouros-keyring artix-keyring... whatever is installed
If you get an error about info@endeavouros not being known then do this:
sudo pacman-key --lsign-key "EndeavourOS"
…then try updating all the keyrings again.
If that still doesn't do the trick and you trust the package and want to ignore the key issue, you can try downloading the package (or leaving it/not deleting it when the key error appears) and then installing it using pacman -U.
References:
Pacman unexpected error
Problem
# pacman -Sy archlinux-keyring error: GPGME error: No data :: Synchronising package databases... core 153.9 KiB 325 KiB/s 00:00 [###################] 100% extra is up to date community is up to date error: GPGME error: No data error: failed to synchronize all databases (unexpected error)
Solution: Clear the database cache and rebuild.
mv /var/lib/pacman/sync /var/tmp/ pacman -Syu
Root cannot log-in
If you cannot log-in as root from a terminal prompt, e.g., with EndeavourOS, it is likely due to the shell being wrong.
In EndeavourOS you will see this in /etc/passwd
(using, e.g., vipw
):
root:x:0:0:root:/root:/usr/bin/bashWhile
/usr/bin/bash
technically points to the same binary as /bin/bash
, the PAM pam_nologin.so module will prevent the log-in of any user who does not have a shell that is listed in /etc/shells. If you check /etc/shells you will see that only /bin/bash and not /usr/bin/bash, is listed there.
Change the root entry thus:
root:x:0:0:root:/root:/bin/bash… and you will be able to log-in as root.