
12

apt-get update报错the public key is not available
source link: https://www.ishells.cn/archives/apt-get-update-error-public-key
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.


ubuntu 更新升级命令
# 取得远端更新服务器的套件档案清单sudo apt-get update # 更新套件sudo apt-get -y dist-upgrade # 清除更新时所下载到本地的更新(安装)档案sudo apt-get clean # 自动清除更新后用不到的旧版本档案sudo apt-get autoremove # 若不定时移除旧核心档案,容易造成/boot空间不足,严重时将无法开机
ubuntu apt 源列表文件位置
/etc/apt/sources.list
ubuntu主机添加或者修改源以后,使用
apt-get update
时,可能会报该错如下:
# apt-get update Hit:1 http://mirrors.cloud.aliyuncs.com/ubuntu xenial InReleaseHit:2 http://mirrors.cloud.aliyuncs.com/ubuntu xenial-updates InRelease Hit:3 http://mirrors.cloud.aliyuncs.com/ubuntu xenial-security InRelease Err:4 https://mirrors.aliyun.com/kubernetes/apt kubernetes-xenial InRelease The following signatures couldn't be verified because the public key is not available: NO_PUBKEY FEEA9169307EA071 NO_PUBKEY 8B57C5C2836F4BEBReading package lists... DoneW: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: https://mirrors.aliyun.com/kubernetes/apt kubernetes-xenial InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY FEEA9169307EA071 NO_PUBKEY 8B57C5C2836F4BEBW: Failed to fetch https://mirrors.aliyun.com/kubernetes/apt/dists/kubernetes-xenial/InRelease The following signatures couldn't be verified because the public key is not available: NO_PUBKEY FEEA9169307EA071 NO_PUBKEY 8B57C5C2836F4BEBW: Some index files failed to download. They have been ignored, or old ones used instead
这是由于etc/apt/sources.list提供的源没有提供公钥,所以更新软件源失败
# 导入报错中提示缺少的公钥# apt-key adv --recv-keys --keyserver keyserver.ubuntu.com XXXXXXXXX
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK