wineW: GPG 错误:https://dl.winehq.org/wine-builds/debian bullseye InRelease: 由于没有公钥,无法验证下列签名: NO_PUBKEY 76F1A20FF987672F E: 仓库 “https://dl.winehq.org/wine-builds/debian bullseye InRelease” 没有数字签名。

错误:21 Index of /wine-builds/debian bullseye InRelease
由于没有公钥,无法验证下列签名: NO_PUBKEY 76F1A20FF987672F
正在读取软件包列表… 完成
W: GPG 错误:Index of /wine-builds/debian bullseye InRelease: 由于没有公钥,无法验证下列签名: NO_PUBKEY 76F1A20FF987672F
E: 仓库 “Index of /wine-builds/debian bullseye InRelease” 没有数字签名。
N: 无法安全地用该源进行更新,所以默认禁用该源。
N: 参见 apt-secure(8) 手册以了解仓库创建和用户配置方面的细节。

1 个赞

(以经安装安装包的密钥)

dell@dell-latitudee6410:~$ wget -nc https://dl.winehq.org/wine-builds/Release.key
文件 “Release.key” 已经存在;不获取。

dell@dell-latitudee6410:~$ sudo apt-key add Release.key
Warning: apt-key is deprecated. Manage keyring files in trusted.gpg.d instead (see apt-key(8)).
OK

看看这个主题: https://forums.debiancn.org/t/topic/2596

:sob: :sob:我还是有点不明白.…

那你直接执行以下命令:

wget https://dl.winehq.org/wine-builds/Release.key
gpg --dearmor <Release.key >wine-keyring.gpg
sudo cp wine-keyring.gpg /usr/share/keyrings/

然后在相应的sources.list文件中找到wine条目,改成如下形式:

deb [signed-by=/usr/share/keyring/wine-keyring.gpg] https://...

不太行

你的真正问题在于遵循了过时的文档。我预计你遵循的文档是 Debian_zhcn - WineHQ Wiki,它是对页面 Debian - WineHQ Wiki的过时中文翻译。后者指出:

The WineHQ repository key was changed on 2018-12-19. If you downloaded and added the key before that time, you will need to download and add the new key and run sudo apt update to accept the repository changes.

存储库密钥的URL已经由 https://dl.winehq.org/wine-builds/Release.key 变为了 https://dl.winehq.org/wine-builds/winehq.key,你遵循过时的文档导入了过时的密钥,这才是出错的原因。

是的,我还觉得奇怪呢,apt-key add 的方式虽然过时了,但应该还是有用的。

我建议参照以下步骤进行操作:

  1. 使用命令apt-key del删除过时的密钥:
    sudo apt-key del 818A435C5FCBF54A
    密钥https://dl.winehq.org/wine-builds/Release.key的ID应当是818A435C5FCBF54A。保险起见,在执行此命令前,首先执行命令sudo apt-key list以进行确认。
  2. 下载密钥:
    wget https://dl.winehq.org/wine-builds/winehq.key
  3. 将密钥转换为二进制形式:
    gpg --dearmor < winehq.key > wine-archive-keyring.gpg
  4. 将密钥放入/usr/share/keyrings
    sudo mv wine-archive-keyring.gpg /usr/share/keyrings/wine-archive-keyring.gpg
  5. 建立仓库的source.list条目,这些条目可以追加到/etc/apt/sources.list中,也可以写在单独的文件当中。在目前的情况下,我建议建立文件/etc/apt/sources.list.d/wine.list,向其中写入:
    deb [signed-by=/usr/share/keyrings/wine-archive-keyring.gpg] https://dl.winehq.org/wine-builds/debian/ bullseye main
  6. 为仓库建立对应的Apt pinning条目,我的建议是建立文件/etc/apt/preferences.d/deriv.pref,向其中写入:
Package: *
Pin: origin dl.winehq.org
Pin-Priority: 100
1 个赞

事实上用


wget -nc https://dl.winehq.org/wine-builds/winehq.key
sudo apt-key add winehq.key

然后正常操作就行了(那中文wine没有更新)
不过谢谢:pray:

使用apt-keyDebian 11上还是可行的,因为Debian 11apt-key暂时还是可用的(计划于Debian 12及更高版本中移除这一命令)。
上面我列出的那个解决方案基于 Debian 添加第三方存储库的建议程序,这个建议的提出和apt-key的弃用至少部分地是出于安全考虑。通过apt-key管理密钥是完全可行的,不过这种方式也是不安全的。

1 个赞