运行 Ubuntu 16.04.4 LTS。
运行时sudo apt update
,最终行如下:
W: GPG error: http://download.opensuse.org/repositories/home:/osmc/xUbuntu_16.04 Release: The following signatures were invalid: KEYEXPIRED 1482381670
E: The repository 'http://download.opensuse.org/repositories/home:/osmc/xUbuntu_16.04 Release' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
apt-key list
显示一键已过期:
pub 2048R/70F1BBEA 2014-10-14 [expired: 2016-12-22]
uid home:osmc OBS Project <home:[email protected]>
(但由于某种原因,apt-key list | grep “expired:”
没有返回任何内容。)
尝试更新此密钥不会改变任何内容:
$ apt-key adv --keyserver keys.gnupg.net --recv-keys 70F1BBEA
Executing: /tmp/tmp.pOcDAzqSkJ/gpg.1.sh --keyserver
keys.gnupg.net
--recv-keys
70F1BBEA
gpg: requesting key 70F1BBEA from hkp server keys.gnupg.net
gpg: key 70F1BBEA: "home:osmc OBS Project <home:[email protected]>" not changed
gpg: Total number processed: 1
gpg: unchanged: 1
我还尝试运行 Y PPA Manager 和“尝试导入所有丢失的 GPG 密钥”,但结果是相同的。
我猜我可能运行的是过时版本的 Opensuse,需要更改它,但我不确定它是什么以及如何正确执行此操作。
答案1
将第三方存储库添加到/etc/apt/sources.list.d/*
文件 或后/etc/apt/sources.list
,您需要确保相应的 gpg 密钥已插入到 apt 密钥库中。
wget http://download.opensuse.org/repositories/home:/osmc/xUbuntu_16.04/Release.key -O - | sudo apt-key add -
sudo apt update
如果由于密钥确实过期而不起作用,请删除错误和警告消息。打开并在行首/etc/apt/sources.list.d/osmc-installer.list
添加井号 ( ),将其变成注释。#
deb
sudo nano /etc/apt/sources.list.d/osmc-installer.list
按键盘组合Ctrl+ O,然后按Enter保存正在编辑的文件。按键盘组合Ctrl+X退出 nano。
更新可用软件包的列表。
sudo apt update