![设置 Livepatch 时显示“机器 ID 已使用不同的密钥启用,或者不唯一”](https://linux22.com/image/1011031/%E8%AE%BE%E7%BD%AE%20Livepatch%20%E6%97%B6%E6%98%BE%E7%A4%BA%E2%80%9C%E6%9C%BA%E5%99%A8%20ID%20%E5%B7%B2%E4%BD%BF%E7%94%A8%E4%B8%8D%E5%90%8C%E7%9A%84%E5%AF%86%E9%92%A5%E5%90%AF%E7%94%A8%EF%BC%8C%E6%88%96%E8%80%85%E4%B8%8D%E5%94%AF%E4%B8%80%E2%80%9D.png)
当我尝试在 Ubuntu Budgie 18.04 的衍生产品上使用“软件和更新”GUI 启用 Livepatch 时,我收到以下错误消息:
Sorry, there's a problem in setting up Canonical Livepatch
我尝试使用上面的步骤手动完成https://auth.livepatch.canonical.com/并运行命令,但我得到以下信息:
2018/12/13 11:11:21 error executing enable: This machine ID is already enabled with
a different key or is non-unique.
Either "sudo canonical-livepatch disable" on the other machine, or regenerate
a unique /etc/machine-id on this machine with "sudo rm /etc/machine-id /var/lib/dbus/machine-id && sudo systemd-machine-id-setup"
: {"error": "Conflicting machine-id"}
我确信我从未在这台笔记本电脑上设置过 Livepatch。这可能是什么问题?
生成错误消息中所建议的新机器 ID 的风险是什么?即我的系统中的哪些其他元素可能正在使用当前机器 ID?
答案1
我按照这个方法解决了问题(总是备份你编辑的文件:D): https://unix.stackexchange.com/questions/402999/it-is-ok-to-change-etc-machine-id
基本上我已经备份了/etc/machine-id
文件/var/lib/dbus/machine-id
然后我从文件中删除了内容/etc/machine-id
(如果需要,可以使用 sudo),并重新初始化了机器 ID。以下是命令
cp /etc/machine-id /etc/machine-id.original
cp /var/lib/dbus/machine-id /var/lib/dbus/machine-id.original
nano /etc/machine-id (to remove the existing value)
systemd-machine-id-setup
> Initializing machine ID from D-Bus machine ID.
cat /etc/machine-id