天天看點

執行:gpg --gen-key 顯示:Not enough random bytes available.

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

43

<code>[root@clovemzone ~]$ gpg --gen-key</code>

<code>gpg (GnuPG) 1.4.5; Copyright (C) 2006 Free Software Foundation, Inc.</code>

<code>This program comes with ABSOLUTELY NO WARRANTY.</code>

<code>This is </code><code>free</code> <code>software, and you are welcome to redistribute it</code>

<code>under certain conditions. See the </code><code>file</code> <code>COPYING </code><code>for</code> <code>details.</code>

<code>Please </code><code>select</code> <code>what kind of key you want:</code>

<code>   </code><code>(1) DSA and Elgamal (default)</code>

<code>   </code><code>(2) DSA (sign only)</code>

<code>   </code><code>(5) RSA (sign only)</code>

<code>Your selection? 1</code>

<code>DSA keypair will have 1024 bits.</code>

<code>ELG-E keys may be between 1024 and 4096 bits long.</code>

<code>What keysize </code><code>do</code> <code>you want? (2048)</code>

<code>Requested keysize is 2048 bits</code>

<code>Please specify how long the key should be valid.</code>

<code>         </code><code>0 = key does not expire</code>

<code>      </code><code>&lt;n&gt;  = key expires </code><code>in</code> <code>n days</code>

<code>      </code><code>&lt;n&gt;w = key expires </code><code>in</code> <code>n weeks</code>

<code>      </code><code>&lt;n&gt;m = key expires </code><code>in</code> <code>n months</code>

<code>      </code><code>&lt;n&gt;y = key expires </code><code>in</code> <code>n years</code>

<code>Key is valid </code><code>for</code><code>? (0) 0</code>

<code>Key does not expire at all</code>

<code>Is this correct? (y</code><code>/N</code><code>) y</code>

<code>You need a user ID to identify your key; the software constructs the user ID</code>

<code>from the Real Name, Comment and Email Address </code><code>in</code> <code>this form:</code>

<code>    </code><code>"Heinrich Heine (Der Dichter) &lt;[email protected]&gt;"</code>

<code>Real name: clovemzone</code>

<code>Email address: [email protected]</code>

<code>Comment: clovem key</code>

<code>You selected this USER-ID:</code>

<code>    </code><code>"clovemzone (fdfd) &lt;[email protected]&gt;"</code>

<code>Change (N)ame, (C)omment, (E)mail or (O)kay/(Q)uit? O</code>

<code>You need a Passphrase to protect your secret key.</code>

<code>You don't want a passphrase - this is probably a *bad* idea!</code>

<code>I will </code><code>do</code> <code>it anyway.  You can change your passphrase at any </code><code>time</code><code>,</code>

<code>using this program with the option </code><code>"--edit-key"</code><code>.</code>

<code>We need to generate a lot of random bytes. It is a good idea to perform</code>

<code>some other action (</code><code>type</code> <code>on the keyboard, move the mouse, utilize the</code>

<code>disks) during the prime generation; this gives the random number</code>

<code>generator a better chance to gain enough entropy.</code>

<code>.+++++.+++++++++++++++.+++++..+++++++++++++++++++++++++..+++++..+++++.++++++++++++++++++++.++++++++++++++++++++++++++++++..++++++++++++++++++++&gt;.++++++++++..........................................+++++</code>

<code>Not enough random bytes available.  Please </code><code>do</code> <code>some other work to give</code>

<code>the OS a chance to collect </code><code>more</code> <code>entropy! (Need 274 </code><code>more</code> <code>bytes)</code>

解決方法:

1.原有程序不退出

2.對一個稍大的tar.gz包解壓

[root@clovemzone ~]# tar zxvf mysql-5.5.29.tar.gz

會發現執行完成,稍等片刻的時間,上面的程序會繼續下去了

<code>+++++++++++++++..+++++++++++++++..++++++++++.+++++.+++++++++++++++.+++++..++++++++++++++++++++++++++++++..++++++++++++++++++++++++++++++++++++++++++++++++++&gt;.++++++++++&gt;+++++....................+++++^^^^</code>

<code>gpg: key 2914933F marked as ultimately trusted</code>

<code>public and secret key created and signed.</code>

<code>gpg: checking the trustdb</code>

<code>gpg: 3 marginal(s) needed, 1 complete(s) needed, PGP trust model</code>

<code>gpg: depth: 0  valid:   5  signed:   0  trust: 0-, 0q, 0n, 0m, 0f, 5u</code>

<code>pub   1024D</code><code>/2914933F</code> <code>2013-06-11</code>

<code>      </code><code>Key fingerprint = C718 A91B 00EE 9FBF 8FB2  4F22 B564 CAFC 2914 933F</code>

<code>uid                  clovemzone (fdfd) &lt;[email protected]&gt;</code>

<code>sub   2048g</code><code>/CFF2F8BB</code> <code>2013-06-11</code>

至此問題解決,問題解決的關鍵就在于這個程序需要更多的随機數什麼的,那就給系統點随機字元即可。

本文轉自 暗黑魔君 51CTO部落格,原文連結:http://blog.51cto.com/clovemfong/1220455,如需轉載請自行聯系原作者

繼續閱讀