看啥

导航

NO_PUBKEY 76F1A20FF987672F

在ubuntu18.04上安装win时,执行sudo add-apt-repository 'deb https://dl.winehq.org/wine-builds/ubuntu/ bionic main'

命中:1 http://mirrors.aliyun.com/ubuntu bionic InRelease
命中:2 http://mirrors.aliyun.com/ubuntu bionic-updates InRelease               
命中:3 http://mirrors.aliyun.com/ubuntu bionic-backports InRelease             
命中:4 http://mirrors.aliyun.com/ubuntu bionic-security InRelease              
获取:5 https://dl.winehq.org/wine-builds/ubuntu bionic InRelease [6,263 B] 
错误:5 https://dl.winehq.org/wine-builds/ubuntu bionic InRelease
  由于没有公钥,无法验证下列签名: NO_PUBKEY 76F1A20FF987672F
正在读取软件包列表... 完成   
W: GPG 错误:https://dl.winehq.org/wine-builds/ubuntu bionic InRelease: 由于没有公钥,无法验证下列签名: NO_PUBKEY 76F1A20FF987672F
E: 仓库 “https://dl.winehq.org/wine-builds/ubuntu bionic InRelease” 没有数字签名。
N: 无法安全地用该源进行更新,所以默认禁用该源。
N: 参见 apt-secure(8) 手册以了解仓库创建和用户配置方面的细节。

然后执行

ant@ant:~$ sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 76F1A20FF987672F
Executing: /tmp/apt-key-gpghome.cqGsTgJcxp/gpg.1.sh --keyserver hkp://keyserver.ubuntu.com:80 --recv 76F1A20FF987672F
gpg: key 76F1A20FF987672F: 22 signatures not checked due to missing keys
gpg: 密钥 76F1A20FF987672F:公钥“WineHQ packages <wine-devel@winehq.org>”已导入
gpg: 合计被处理的数量:1
gpg:               已导入:1
-------------------------------------------------------------------------------------------
ant@ant:~$ sudo apt update
命中:1 http://mirrors.aliyun.com/ubuntu bionic InRelease
命中:2 http://mirrors.aliyun.com/ubuntu bionic-updates InRelease               
命中:3 http://mirrors.aliyun.com/ubuntu bionic-backports InRelease             
命中:4 http://mirrors.aliyun.com/ubuntu bionic-security InRelease              
获取:5 https://dl.winehq.org/wine-builds/ubuntu bionic InRelease [6,263 B]     
错误:5 https://dl.winehq.org/wine-builds/ubuntu bionic InRelease
  由于没有公钥,无法验证下列签名: NO_PUBKEY 76F1A20FF987672F
正在读取软件包列表... 完成   
W: GPG 错误:https://dl.winehq.org/wine-builds/ubuntu bionic InRelease: 由于没有公钥,无法验证下列签名: NO_PUBKEY 76F1A20FF987672F
E: 仓库 “https://dl.winehq.org/wine-builds/ubuntu bionic InRelease” 没有数字签名。
N: 无法安全地用该源进行更新,所以默认禁用该源。
N: 参见 apt-secure(8) 手册以了解仓库创建和用户配置方面的细节。

哈哈依然无效--------》继续看官网
Apt-key 已被弃用。 如果您看到关于这个的警告,请使用命令 sudo apt-key del "D43F 6401 4536 9C51 D786 DDEA 76F1 A20F F987 672F" 来删除密钥。 然后从 /etc/apt/sources.list 删除有关 WineHQ 仓库的那一行。

哦哦哦哦原来如此

ant@ant:~$ cat /etc/apt/sources.list.d/winehq-bionic.sources 
Types: deb
URIs: https://dl.winehq.org/wine-builds/ubuntu
Suites: bionic
Components: main
Architectures: amd64 i386
Signed-By: /etc/apt/keyrings/winehq-archive.key

发现winehq-archive.key存放位置错了
官方坑
sudo wget -nc -O /usr/share/keyrings/winehq-archive.key https://dl.winehq.org/wine-builds/winehq.key
修改

ant@ant:~$ sudo mkdir /etc/apt/keyrings/
ant@ant:~$ sudo mv /usr/share/keyrings/winehq-archive.key /etc/apt/keyrings/wine
ant@ant:~$ sudo apt update
命中:1 http://mirrors.aliyun.com/ubuntu bionic InRelease
命中:2 http://mirrors.aliyun.com/ubuntu bionic-updates InRelease               
命中:3 http://mirrors.aliyun.com/ubuntu bionic-backports InRelease             
命中:4 http://mirrors.aliyun.com/ubuntu bionic-security InRelease              
获取:5 https://dl.winehq.org/wine-builds/ubuntu bionic InRelease [6,263 B]     
获取:6 https://dl.winehq.org/wine-builds/ubuntu bionic/main i386 Packages [1,023 kB]
获取:7 https://dl.winehq.org/wine-builds/ubuntu bionic/main amd64 Packages [988 kB]
已下载 2,010 kB,耗时 1分 36秒 (21.0 kB/s)                                     
正在读取软件包列表... 完成
正在分析软件包的依赖关系树       
正在读取状态信息... 完成       
有 213 个软件包可以升级。请执行 ‘apt list --upgradable’ 来查看它们。

posted on 2022-09-16 09:52  看啥  阅读(788)  评论(0编辑  收藏  举报