5

I have installed Arch Linux on my system and now when I try to install something using pacman, it gives me an error that the key 'xxxxxxx' was not found.

I Googled and found out I should have run pacman-key --init.
Now when I run pacman-key --init, it seems to go on for ever. I waited for more than 45 minutes, but still no result. I think it has something to do with generating Entropy.

Any idea what is wrong?

9

Nothing is wrong. As the Arch Wiki notes:

For this initialization entropy is required. Moving your mouse around, pressing random characters at the keyboard or running some disk-based activity (for example in another console running ls -R / or find / -name foo) should generate entropy. If your system does not already have sufficient entropy, this step may take hours; if you actively generate entropy it will complete much more quickly.

You can read more about entropy in the Linux Kernel on Wikipedia.

| improve this answer | |
  • I ran the ls -R / many times in another terminal session (while running pacman-key), but no result. – John Smith Jun 20 '12 at 7:05
  • Try something else that generates IO; redirecting output to a file and editing in vi is what I did last time around... – jasonwryan Jun 20 '12 at 7:10
  • I did ls -R / > somefile and then vi somefile. Then I deleted a line and wrote the buffer to the disk (dd and :w) repeatedly. It completed very soon! Thank you. – John Smith Jun 21 '12 at 4:02
0

Unless you are working in NSA, the bank or require really high security, you can:

ln -f /dev/urandom /dev/random

before running pacman-key --init. Using /dev/urandom is usually perfectly safe.

| improve this answer | |
-1

You do not need vi or edit file , if you run ls -R / | xargs -I {} echo {}

Run that commad , and on new session run pacman-key --init

You get key less than 5 minutes

| improve this answer | |
  • This does not add anything to the existing answer (why), but is an alternative approach to addressing it (how). – jasonwryan Jan 12 '17 at 19:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.