Author Topic: [Manjaro 15.12]error: key "####################" could not be looked up remotely  (Read 2394 times)

0 Members and 1 Guest are viewing this topic.

Offline Alfablos

  • Neuling
  • *
  • Posts: 6
  • I'm new. Be nice!
    • Twitter
  • Skill: Novice

Hi guys,
this is my first post on this forum, I hope this helps people who, like me, got stuck at this error!

So! It all started with me having just finished installing Manjaro 15.12 KDE (but I got the same error with XFCE too).
I wanted to update the system, so:
Quote
sudo pacman -Syu
Well, the first thing I noticed was the download was slow as hell, so I went:
Quote
sudo pacman-mirrors -g
Just like https://wiki.manjaro.org/index.php/Rankmirrors_to_Set_the_Fastest_Download_Server said
I had to repeat It a couple of times but in the end I managed to download full-speed.
Anyway, once all the packages were downloades pacman started to install them, untill...
Quote
error: key "####################" could not be looked up remotely
No packages were upgraded
I googled and found this:
Quote
https://wiki.manjaro.org/index.php/Pacman_troubleshooting
Of course I looked up under "Errors about keys" and started typing:
Quote
sudo rm -r /etc/pacman.d/gnupg
Unfortunately I got this message (1st screenshot):
Quote
rm: cannot remove "/etc/pacman.d/gnupg": Device or resource busy
I went into /etc/pacman.d/gnupg folder and It was empty, so I didn't worry about it. I went on with the troubleshooting:
Quote
sudo pacman -Sy gnupg archlinux-keyring manjaro-keyring
And here again (2nd screenshot):
Quote
:: Proceed with installation? [Y/n] y
(3/3) checking keys in keyring                     [######################] 100%
warning: Public keyring not found; have you run 'pacman-key --init'?
downloading required keys...
error: key "E62F853100F0D0F0" could not be looked up remotely
error: key "7F2D434B9741E8AC" could not be looked up remotely
error: key "CAA6A59611C7F07E" could not be looked up remotely
error: required key missing from keyring
error: failed to commit transaction (unexpected error)
Errors occurred, no packages were upgraded.
So I thought "Ok, we've got a problem with the keyring! Let's reinstall It! Oh wait... How can I reinstall a non-working keyring when I need a keyring to install software?!"
The answer was "Temporarily disabling the key authentication"!
I googled and found https://wiki.archlinux.org/index.php/Pacman/Package_signing . Scroll down and you'll find:
Quote
Disabling signature checking:
Edit /etc/pacman.conf and set
SigLevel = Never
Actually, i made a copy of the file using
Quote
sudo cp /etc/pacman.conf /etc/pacman.conf.bkp
and then edited /etc/pacman.conf (Change "SigLevel" from "Required DatabaseOptional" to "Never")
Quote
sudo nano /etc/pacman.conf

After that you can go on reinstalling the keyring as suggested in the second link (https://wiki.manjaro.org/index.php/Pacman_troubleshooting). Again:
Quote
sudo pacman -Sy gnupg archlinux-keyring manjaro-keyring
This time It'll work!

Quote
sudo pacman-key --init
Quote
sudo pacman-key --populate archlinux manjaro
Quote
sudo pacman-key --refresh-keys
Quote
sudo pacman -Sc

Now you're done! BUT before you run the ultimate sudo pacman -Syu to update the system, you want to re-enable the key signature checking either editing /etc/pacman.conf and reverting "SigLevel" to "Required DatabaseOptional", or deleting the /etc/pacman.conf file and renaming its backup copy /etc/pacman.conf.bkp to original /etc/pacman.conf
Quote
sudo mv /etc/pacman.conf.bkp /etc/pacman.conf

And now
Quote
sudo macman -Syu
won't fail! I give you my word! :)

Antonio

Offline excalibur1234

  • Global Moderator
  • *****
  • Posts: 2508
  • Branch: unstable
  • Desktop: net-minimal + LXQt
  • GPU driver: video-nouveau
  • Kernel: 4.6
  • Skill: Intermediate
thanks for sharing your solution for the key problem.



i am working on pacli and i want to solve as many potential problems as possible with a push of a button.

i am curious, would the following solution have worked for you:
Code: [Select]
!!13 - FIX ERRORS!!
Multiple commands attempt to fix the most common issues Manjaro users have with Pacman:

"sudo rm -f /var/lib/pacman/db.lck"
This command removes Pacman's database lock.
Attention: Only run this command when no other Pacman instance (e.g. Pacman, Yaourt, Pamac, Octopi, PacmanXG4, ...) is running.

"sudo pacman-mirrors -g && sudo pacman -Syy"
This command searches for working and good Manjaro repository mirrors/servers. It will automatically choose the closest server for you. The second command forces a redownload of the latest package database from the best Manjaro repository mirror.

"sudo rm -r /etc/pacman.d/gnupg && sudo pacman -Sy gnupg archlinux-keyring manjaro-keyring && sudo pacman-key --init && sudo pacman-key --populate archlinux manjaro"
This series of commands resets and deletes your Pacman, Manjaro, and Arch key database and installs all keys again. This will solve problems with your local key database and Manjaro's and Arch's key database. Such problems can occur when new new packagers get added, for example.
Attention: This command might take a long time to complete. If your system appears to stop or hang, it searches for entropy in order to generate a new key for you. In this case, it might help to open a browser and do some heavy surfing (with a lot of mouse movements, mouse klicks, and keyboard key presses): This can help to generate entropy faster.
Attention: If you want to execute these commands manually on a system with key database problems, the command "pacman -Sy gnupg archlinux-keyring manjaro-keyring" will not work for you! In this case, connect manually (via your browser) to your Manjaro repository server, download these packages, and install these packages manually.

"sudo pacman -Syyuu"
This last command forces a redownload of the latest package database from the best Manjaro repository mirror. Then, all your installed packages are checked against this latest package database. If an updated package is available from the Manjaro repositories, it will get downloaded and installed on your system. If an installed package is newer than the same package in the Manjaro repositories, the installed package will get downgraded. This behavior ensures your packages are always in sync with the Manajro repositories, even if you have just switched the Manjaro mirror or switched from unstable to stable branch.

the first command "sudo rm -f /var/lib/pacman/db.lck" should have fixed the "device or resource busy" error...
Need more information? Search here:   Manjaro Forum   |   Manjaro Wiki   |   Arch Wiki

Offline Alfablos

  • Neuling
  • *
  • Posts: 6
  • I'm new. Be nice!
    • Twitter
  • Skill: Novice
thanks for sharing your solution for the key problem.



i am working on pacli and i want to solve as many potential problems as possible with a push of a button.

i am curious, would the following solution have worked for you:
Code: [Select]
!!13 - FIX ERRORS!!
Multiple commands attempt to fix the most common issues Manjaro users have with Pacman:

"sudo rm -f /var/lib/pacman/db.lck"
This command removes Pacman's database lock.
Attention: Only run this command when no other Pacman instance (e.g. Pacman, Yaourt, Pamac, Octopi, PacmanXG4, ...) is running.

"sudo pacman-mirrors -g && sudo pacman -Syy"
This command searches for working and good Manjaro repository mirrors/servers. It will automatically choose the closest server for you. The second command forces a redownload of the latest package database from the best Manjaro repository mirror.

"sudo rm -r /etc/pacman.d/gnupg && sudo pacman -Sy gnupg archlinux-keyring manjaro-keyring && sudo pacman-key --init && sudo pacman-key --populate archlinux manjaro"
This series of commands resets and deletes your Pacman, Manjaro, and Arch key database and installs all keys again. This will solve problems with your local key database and Manjaro's and Arch's key database. Such problems can occur when new new packagers get added, for example.
Attention: This command might take a long time to complete. If your system appears to stop or hang, it searches for entropy in order to generate a new key for you. In this case, it might help to open a browser and do some heavy surfing (with a lot of mouse movements, mouse klicks, and keyboard key presses): This can help to generate entropy faster.
Attention: If you want to execute these commands manually on a system with key database problems, the command "pacman -Sy gnupg archlinux-keyring manjaro-keyring" will not work for you! In this case, connect manually (via your browser) to your Manjaro repository server, download these packages, and install these packages manually.

"sudo pacman -Syyuu"
This last command forces a redownload of the latest package database from the best Manjaro repository mirror. Then, all your installed packages are checked against this latest package database. If an updated package is available from the Manjaro repositories, it will get downloaded and installed on your system. If an installed package is newer than the same package in the Manjaro repositories, the installed package will get downgraded. This behavior ensures your packages are always in sync with the Manajro repositories, even if you have just switched the Manjaro mirror or switched from unstable to stable branch.

the first command "sudo rm -f /var/lib/pacman/db.lck" should have fixed the "device or resource busy" error...

I had to reinstall the system, so I took some time to try your solution.
Everything works until
Quote
sudo rm -r /etc/pacman.d/gnupg && sudo pacman -Sy gnupg archlinux-keyring manjaro-keyring && sudo pacman-key --init && sudo pacman-key --populate archlinux manjaro
I get
Quote
errore: key "E62F853100F0D0F0" could not be looked up remotely
errore: key "7F2D434B9741E8AC" could not be looked up remotely
errore: key "CAA6A59611C7F07E" could not be looked up remotely
see above (1st post) for the rest of the error, this time I set Italian as system language so It wouldn't help you to see that :)
Anyway the problem is that to install working keyrings I need a proper keys handling, which can't be until you install a working keyring. So you can't quit this unless you temporarily disable key signature in order to get to install a working keyring.
I'll disable kay signature and then proceed with your solution :)
Antonio
« Last Edit: 24. April 2016, 21:24:43 by Alfablos »

Offline Alfablos

  • Neuling
  • *
  • Posts: 6
  • I'm new. Be nice!
    • Twitter
  • Skill: Novice
thanks for sharing your solution for the key problem.



i am working on pacli and i want to solve as many potential problems as possible with a push of a button.

i am curious, would the following solution have worked for you:
Code: [Select]
!!13 - FIX ERRORS!!
Multiple commands attempt to fix the most common issues Manjaro users have with Pacman:

"sudo rm -f /var/lib/pacman/db.lck"
This command removes Pacman's database lock.
Attention: Only run this command when no other Pacman instance (e.g. Pacman, Yaourt, Pamac, Octopi, PacmanXG4, ...) is running.

"sudo pacman-mirrors -g && sudo pacman -Syy"
This command searches for working and good Manjaro repository mirrors/servers. It will automatically choose the closest server for you. The second command forces a redownload of the latest package database from the best Manjaro repository mirror.

"sudo rm -r /etc/pacman.d/gnupg && sudo pacman -Sy gnupg archlinux-keyring manjaro-keyring && sudo pacman-key --init && sudo pacman-key --populate archlinux manjaro"
This series of commands resets and deletes your Pacman, Manjaro, and Arch key database and installs all keys again. This will solve problems with your local key database and Manjaro's and Arch's key database. Such problems can occur when new new packagers get added, for example.
Attention: This command might take a long time to complete. If your system appears to stop or hang, it searches for entropy in order to generate a new key for you. In this case, it might help to open a browser and do some heavy surfing (with a lot of mouse movements, mouse klicks, and keyboard key presses): This can help to generate entropy faster.
Attention: If you want to execute these commands manually on a system with key database problems, the command "pacman -Sy gnupg archlinux-keyring manjaro-keyring" will not work for you! In this case, connect manually (via your browser) to your Manjaro repository server, download these packages, and install these packages manually.

"sudo pacman -Syyuu"
This last command forces a redownload of the latest package database from the best Manjaro repository mirror. Then, all your installed packages are checked against this latest package database. If an updated package is available from the Manjaro repositories, it will get downloaded and installed on your system. If an installed package is newer than the same package in the Manjaro repositories, the installed package will get downgraded. This behavior ensures your packages are always in sync with the Manajro repositories, even if you have just switched the Manjaro mirror or switched from unstable to stable branch.

the first command "sudo rm -f /var/lib/pacman/db.lck" should have fixed the "device or resource busy" error...

As a matter of fact, the "sudo rm -f /var/lib/pacman/db.lck" command fixed  the error.
What went wrong is that /etc/pacman.d/gnupg didn't exist before the "sudo rm -r /etc/pacman.d/gnupg && sudo pacman -Sy gnupg archlinux-keyring manjaro-keyring && sudo pacman-key --init && sudo pacman-key --populate archlinux manjaro" command, so It returned me an "Unable to remove /etc/pacman.d/gnupg: the file o directory doesn't exist.
Apart from that, deleting that part of the command, the operation went just fine.
I told you just in case what you posted was part of a script, in that case you may want to tell the script to ignore the error.
I'm going on with the procedure.

Offline Alfablos

  • Neuling
  • *
  • Posts: 6
  • I'm new. Be nice!
    • Twitter
  • Skill: Novice
thanks for sharing your solution for the key problem.



i am working on pacli and i want to solve as many potential problems as possible with a push of a button.

i am curious, would the following solution have worked for you:
Code: [Select]
!!13 - FIX ERRORS!!
Multiple commands attempt to fix the most common issues Manjaro users have with Pacman:

"sudo rm -f /var/lib/pacman/db.lck"
This command removes Pacman's database lock.
Attention: Only run this command when no other Pacman instance (e.g. Pacman, Yaourt, Pamac, Octopi, PacmanXG4, ...) is running.

"sudo pacman-mirrors -g && sudo pacman -Syy"
This command searches for working and good Manjaro repository mirrors/servers. It will automatically choose the closest server for you. The second command forces a redownload of the latest package database from the best Manjaro repository mirror.

"sudo rm -r /etc/pacman.d/gnupg && sudo pacman -Sy gnupg archlinux-keyring manjaro-keyring && sudo pacman-key --init && sudo pacman-key --populate archlinux manjaro"
This series of commands resets and deletes your Pacman, Manjaro, and Arch key database and installs all keys again. This will solve problems with your local key database and Manjaro's and Arch's key database. Such problems can occur when new new packagers get added, for example.
Attention: This command might take a long time to complete. If your system appears to stop or hang, it searches for entropy in order to generate a new key for you. In this case, it might help to open a browser and do some heavy surfing (with a lot of mouse movements, mouse klicks, and keyboard key presses): This can help to generate entropy faster.
Attention: If you want to execute these commands manually on a system with key database problems, the command "pacman -Sy gnupg archlinux-keyring manjaro-keyring" will not work for you! In this case, connect manually (via your browser) to your Manjaro repository server, download these packages, and install these packages manually.

"sudo pacman -Syyuu"
This last command forces a redownload of the latest package database from the best Manjaro repository mirror. Then, all your installed packages are checked against this latest package database. If an updated package is available from the Manjaro repositories, it will get downloaded and installed on your system. If an installed package is newer than the same package in the Manjaro repositories, the installed package will get downgraded. This behavior ensures your packages are always in sync with the Manajro repositories, even if you have just switched the Manjaro mirror or switched from unstable to stable branch.

the first command "sudo rm -f /var/lib/pacman/db.lck" should have fixed the "device or resource busy" error...

Done! Everything went ok!

Offline excalibur1234

  • Global Moderator
  • *****
  • Posts: 2508
  • Branch: unstable
  • Desktop: net-minimal + LXQt
  • GPU driver: video-nouveau
  • Kernel: 4.6
  • Skill: Intermediate
thanks again for your report.
i will change the script to adopt for cases in which gnupg is not installed on the system.
Need more information? Search here:   Manjaro Forum   |   Manjaro Wiki   |   Arch Wiki