zoukankan      html  css  js  c++  java
  • 运行gpg --gen-key生成key时出现卡住的问题

    运行gpg --gen-key生成key时出现卡住的问题

    2017年02月21日 05:31:20
    阅读数:1530

    背景

      在搭建Ubuntu16.04的本地apt源时,需要运行“gpg –gen-key”命令,但是在执行该命令时,出现了:“Not enough random bytes available. Please do some other work to give the OS a chance to collect more ”的提示,而且一直卡住。

    分析

      更详细的提示,参加:

    We need to generate a lot of random bytes. It is a good idea to perform some other action (type on the keyboard, move the mouse, utilize the disks) during the prime generation; this gives the random number generator a better chance to gain enough entropy.
    • 1
    • 2
    • 3
    • 4

      根据提示,该命令生成key时,需要kernel为该程序生成足够多的随机数,因此,我们只需要为kernel生成随机数即可。

    解决方法:

      安装rng-tools工具,该工具可以像指定文件生成随机数。这里,我们不需要退出原正在执行gpg –gen-key命令的console,新建一个终端,执行如下命令。命令执行完成后,原来卡住的界面就恢复运行了。 
    “` 
    aptgetinstallrngtools rng -r /dev/urandom 

  • 相关阅读:
    Unix IPC之共享内存区(1)
    linux下的二进制文件的编辑和查看
    Posix 信号量
    Unix IPC之Posix信号量实现生产者消费者
    整型信号量与记录型信号量
    C++之友元
    C++之异常处理
    C++之STL(标准模板库)
    C++之继承
    C++之封装
  • 原文地址:https://www.cnblogs.com/LiuYanYGZ/p/9432191.html
Copyright © 2011-2022 走看看