Ubuntu 22.10一直update 失败的问题
标签: ubuntu
- 作者帖子
- Up::31
使用sudp apt update && sudo apt upgrade命令一直提示错误
Reading package lists… Done
W: https://download.docker.com/linux/ubuntu/dists/kinetic/InRelease: Key is stored in legacy trusted.gpg keyring (/etc/apt/trusted.gpg), see the DEPRECATION section in apt-key(8) for details.
E: The repository ‘https://mirrors.ustc.edu.cn/ubuntu kinetic Release’ does not have a Release file.
N: Updating from such a repository can’t be done securely, and is therefore disabled by default.
1. 清除APT缓存和旧的GPG密钥:运行以下命令清除APT软件包列表的缓存信息和旧的GPG密钥:
sudo rm -rf /var/lib/apt/lists/*
sudo rm /etc/apt/trusted.gpg
2. 更新软件源信息:确保/etc/apt/sources.list中仅包含官方源的信息,然后运行以下命令更新软件源列表:
sudo apt update
3. 更新GPG密钥:您可能需要添加Docker软件源的新GPG密钥,如果您仍然想从Docker官方源安装软件。您可以使用以下命令添加Docker的GPG密钥:
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg –dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
接着,更新apt配置以使用新的密钥:
echo “deb [arch=$(dpkg –print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable” | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
4. 再次运行sudo apt update来重新更新软件源列表。
- 作者帖子
- 哎呀,回复话题必需登录。