Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PGP: Not enough random bytes available. Please do some other work to give the OS a chance to collect more entropy

Setup : Ubuntu Server on Virtual Machine with 6 cores and 3GB of RAM.

when I am trying to generate a asymmetric key pair via GPG like this gpg --gen-key . I get the following error :

Not enough random bytes available.  Please do some other work to give the OS a chance to collect more entropy! 

I tried to google a little bit. This is what I realise , I need to fire up another terminal and type in cat /udev/random --> It randomly generates a series of randomly generated values to increase the entropy.

I dont see any change in here watch cat /proc/sys/kernel/random/entropy_avail

and it still persists to give me the same error

like image 577
user1524529 Avatar asked Jul 29 '12 10:07

user1524529


2 Answers

Run the following:

find / > /dev/null 

That helped me quickly to complete my key generation.

like image 178
zdenekca Avatar answered Sep 28 '22 09:09

zdenekca


Try installing haveged, this is a daemon, which helps the system with generating random numbers for your key.

sudo aptitude install haveged

like image 43
mieciu Avatar answered Sep 28 '22 09:09

mieciu