今天在我的本地环境VMWare中安装了UOS服务器版的操作系统,先切换一下国内的源,但是一直报错。
执行命令
代码语言:javascript复制sudo apt-get update
执行以上命令后出现
代码语言:javascript复制获取:1 http://mirrors.163.com/ubuntu bionic InRelease [242 kB]
获取:2 http://mirrors.163.com/ubuntu bionic-security InRelease [88.7 kB]
错误:1 http://mirrors.163.com/ubuntu bionic InRelease
由于没有公钥,无法验证下列签名: NO_PUBKEY 3B4FE6ACC0B21F32
错误:2 http://mirrors.163.com/ubuntu bionic-security InRelease
由于没有公钥,无法验证下列签名: NO_PUBKEY 3B4FE6ACC0B21F32
正在读取软件包列表... 完成
W: GPG 错误:http://mirrors.163.com/ubuntu bionic InRelease: 由于没有公钥,无法验证下列签名: NO_PUBKEY 3B4FE6ACC0B21F32
E: 仓库 “http://mirrors.163.com/ubuntu bionic InRelease” 没有数字签名。
N: 无法安全地用该源进行更新,所以默认禁用该源。
N: 参见 apt-secure(8) 手册以了解仓库创建和用户配置方面的细节。
W: GPG 错误:http://mirrors.163.com/ubuntu bionic-security InRelease: 由于没有公钥,无法验证下列签名: NO_PUBKEY 3B4FE6ACC0B21F32
E: 仓库 “http://mirrors.163.com/ubuntu bionic-security InRelease” 没有数字签名。
N: 无法安全地用该源进行更新,所以默认禁用该源。
N: 参见 apt-secure(8) 手册以了解仓库创建和用户配置方面的细节。
解决办法
代码语言:javascript复制sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 3B4FE6ACC0B21F32
# 将签名更换为报错的那个
然后再次执行更新命令就可以了
代码语言:javascript复制root@uos-PC:/home/uos/iso# sudo apt-get update
获取:1 http://mirrors.163.com/ubuntu bionic InRelease [242 kB]
获取:2 http://mirrors.163.com/ubuntu bionic-security InRelease [88.7 kB]
获取:3 http://mirrors.163.com/ubuntu bionic/main amd64 Packages [1,019 kB]
获取:4 http://mirrors.163.com/ubuntu bionic/main i386 Packages [1,007 kB]
获取:5 http://mirrors.163.com/ubuntu bionic/main Translation-zh_CN [67.7 kB]
获取:6 http://mirrors.163.com/ubuntu bionic/main Translation-en [516 kB]
获取:7 http://mirrors.163.com/ubuntu bionic/restricted i386 Packages [9,156 B]
获取:8 http://mirrors.163.com/ubuntu bionic/restricted amd64 Packages [9,184 B]
获取:9 http://mirrors.163.com/ubuntu bionic/restricted Translation-zh_CN [1,188 B]
获取:10 http://mirrors.163.com/ubuntu bionic/restricted Translation-en [3,584 B]
获取:11 http://mirrors.163.com/ubuntu bionic/universe i386 Packages [8,531 kB]
获取:12 http://mirrors.163.com/ubuntu bionic/universe amd64 Packages [8,570 kB]
获取:13 http://mirrors.163.com/ubuntu bionic/universe Translation-en [4,941 kB]
获取:14 http://mirrors.163.com/ubuntu bionic/universe Translation-zh_CN [174 kB]
获取:15 http://mirrors.163.com/ubuntu bionic/multiverse i386 Packages [144 kB]
获取:16 http://mirrors.163.com/ubuntu bionic/multiverse amd64 Packages [151 kB]
获取:17 http://mirrors.163.com/ubuntu bionic/multiverse Translation-zh_CN [4,768 B]
获取:18 http://mirrors.163.com/ubuntu bionic/multiverse Translation-en [108 kB]
获取:19 http://mirrors.163.com/ubuntu bionic-security/main i386 Packages [846 kB]
获取:20 http://mirrors.163.com/ubuntu bionic-security/main amd64 Packages [1,399 kB]
获取:21 http://mirrors.163.com/ubuntu bionic-security/main Translation-en [276 kB]
获取:22 http://mirrors.163.com/ubuntu bionic-security/restricted i386 Packages [8,972 B]
获取:23 http://mirrors.163.com/ubuntu bionic-security/restricted amd64 Packages [166 kB]
获取:24 http://mirrors.163.com/ubuntu bionic-security/restricted Translation-en [22.1 kB]
获取:25 http://mirrors.163.com/ubuntu bionic-security/universe amd64 Packages [1,079 kB]
获取:26 http://mirrors.163.com/ubuntu bionic-security/universe i386 Packages [965 kB]
获取:27 http://mirrors.163.com/ubuntu bionic-security/universe Translation-en [241 kB]
获取:28 http://mirrors.163.com/ubuntu bionic-security/multiverse i386 Packages [4,812 B]
获取:29 http://mirrors.163.com/ubuntu bionic-security/multiverse amd64 Packages [12.9 kB]
获取:30 http://mirrors.163.com/ubuntu bionic-security/multiverse Translation-en [2,964 B]
已下载 30.6 MB,耗时 6秒 (5,155 kB/s)
正在读取软件包列表... 完成
如果还是不行的话,说明源不行,需要换源。