ubuntu22.04-无法update:

1、报错原因

使用命令:sudo apt-get update     报错

获取:1 https://mirrors.tuna.tsinghua.edu.cn/ubuntu bionic InRelease [242 kB]
获取:2 https://mirrors.tuna.tsinghua.edu.cn/ubuntu bionic-updates InRelease [88.7 kB]      
获取:3 https://mirrors.tuna.tsinghua.edu.cn/ubuntu bionic-backports InRelease [83.3 kB]          
获取:4 https://mirrors.tuna.tsinghua.edu.cn/ubuntu bionic-security InRelease [88.7 kB]           
错误:1 https://mirrors.tuna.tsinghua.edu.cn/ubuntu bionic InRelease                              
  由于没有公钥,无法验证下列签名: NO_PUBKEY 3B4FE6ACC0B21F32
错误:2 https://mirrors.tuna.tsinghua.edu.cn/ubuntu bionic-updates InRelease                      
  由于没有公钥,无法验证下列签名: NO_PUBKEY 3B4FE6ACC0B21F32
错误:3 https://mirrors.tuna.tsinghua.edu.cn/ubuntu bionic-backports InRelease
  由于没有公钥,无法验证下列签名: NO_PUBKEY 3B4FE6ACC0B21F32
错误:4 https://mirrors.tuna.tsinghua.edu.cn/ubuntu bionic-security InRelease
  由于没有公钥,无法验证下列签名: NO_PUBKEY 3B4FE6ACC0B21F32
命中:5 https://ppa.launchpadcontent.net/ondrej/nginx/ubuntu jammy InRelease
正在读取软件包列表... 完成
W: GPG 错误:https://mirrors.tuna.tsinghua.edu.cn/ubuntu bionic InRelease: 由于没有公钥,无法验证下列签名: NO_PUBKEY 3B4FE6ACC0B21F32
E: 仓库 “https://mirrors.tuna.tsinghua.edu.cn/ubuntu bionic InRelease” 没有数字签名。
N: 无法安全地用该源进行更新,所以默认禁用该源。
N: 参见 apt-secure(8) 手册以了解仓库创建和用户配置方面的细节。
W: GPG 错误:https://mirrors.tuna.tsinghua.edu.cn/ubuntu bionic-updates InRelease: 由于没有公钥,无法验证下列签名: NO_PUBKEY 3B4FE6ACC0B21F32
E: 仓库 “https://mirrors.tuna.tsinghua.edu.cn/ubuntu bionic-updates InRelease” 没有数字签名。
N: 无法安全地用该源进行更新,所以默认禁用该源。
N: 参见 apt-secure(8) 手册以了解仓库创建和用户配置方面的细节。
W: GPG 错误:https://mirrors.tuna.tsinghua.edu.cn/ubuntu bionic-backports InRelease: 由于没有公钥,无法验证下列签名: NO_PUBKEY 3B4FE6ACC0B21F32
E: 仓库 “https://mirrors.tuna.tsinghua.edu.cn/ubuntu bionic-backports InRelease” 没有数字签名。
N: 无法安全地用该源进行更新,所以默认禁用该源。
N: 参见 apt-secure(8) 手册以了解仓库创建和用户配置方面的细节。
W: GPG 错误:https://mirrors.tuna.tsinghua.edu.cn/ubuntu bionic-security InRelease: 由于没有公钥,无法验证下列签名: NO_PUBKEY 3B4FE6ACC0B21F32
E: 仓库 “https://mirrors.tuna.tsinghua.edu.cn/ubuntu bionic-security InRelease” 没有数字签名。
N: 无法安全地用该源进行更新,所以默认禁用该源。
N: 参见 apt-secure(8) 手册以了解仓库创建和用户配置方面的细节。

2、解决方法

使用清华源:

ubuntu | 镜像站使用帮助 | 清华大学开源软件镜像站 | Tsinghua Open Source Mirror

根据自己的系统情况,配置,复制内容

3、将源换一下

vi /etc/apt/sources.list

将旧的内容删除,将2中复制的粘贴进去

4、再执行 sudo apt-get update

5、基本上就没有问题了

你可能感兴趣的:(ubuntu)