sudo apt update:在抛出“std::runtime_error”实例后调用终止

m-d*_*-dw 5 updates apt

我在 Ubuntu 18.04 服务器上随机看到以下错误。

sudo apt update
[sudo] password for david: 
Hit:1 http://archive.ubuntu.com/ubuntu bionic InRelease
Get:2 http://security.ubuntu.com/ubuntu bionic-security InRelease [83.2 kB]
Get:3 http://archive.ubuntu.com/ubuntu bionic-updates InRelease [83.2 kB]           
Get:4 http://archive.ubuntu.com/ubuntu bionic-backports InRelease [74.6 kB]                    
0% [1 InRelease gpgv 242 kB] [4 InRelease 2,281 B/74.6 kB 3%]terminate called after throwing an instance of 'std::runtime_error'
  what():  random_device::__x86_rdrand(void)
Aborted
Run Code Online (Sandbox Code Playgroud)

有时重新启动可以解决问题,有时则不能。目前没有。一度似乎与 urbackup 有关,但今天停止服务并不能解决问题。

Eld*_*eek 1

除了此评论中提到的解决方法之外,您似乎已受到此错误的影响。看来是存在熵不足的问题。据报道,该问题现已在apt 1.7.0~alpha2中得到修复。目前存储库中似乎不支持受支持的版本,尽管可能很快就会实现。来源可在前面的链接中找到。但是,如果您想尝试避免从源代码进行编译,可以从cosmic 分支获取 apt_1.7.0~alpha3_amd64.deb 就我个人而言,我会编译,因为在以前的版本中使用 cosmic deb 可能会破坏一些东西,在这种情况下你就有了碎片。