Parrot OS安装Docker后执行sudo apt update报错求助
解决Parrot OS下Docker Ubuntu源ara版本404报错问题
问题现象
执行sudo apt update时出现如下报错:
Hit:1 https://dl.google.com/linux/chrome/deb stable InRelease Ign:2 https://download.docker.com/linux/ubuntu ara InRelease Err:3 https://download.docker.com/linux/ubuntu ara Release 404 Not Found [IP: 13.224.189.54 443] Hit:4 https://deb.parrot.sh/parrot lts InRelease Hit:5 https://deb.parrot.sh/parrot parrot InRelease Hit:6 https://deb.parrot.sh/direct/parrot parrot-security InRelease Hit:7 https://deb.parrot.sh/parrot parrot-backports InRelease Reading package lists... Done E: The repository 'https://download.docker.com/linux/ubuntu ara Release' does not have a Release file. N: Updating from such a repository can't be done securely, and is therefore disabled bydefault. N: See apt-secure(8) manpage for repository creation and user configuration details.
核心问题是添加了错误的Docker Ubuntu源:ara并非Ubuntu的版本代号,且Parrot OS基于Debian,不兼容Ubuntu的Docker源。
解决方案
方法一:使用Parrot官方源安装Docker(推荐)
Parrot OS官方源自带Docker包,无需额外添加第三方源,直接执行:
sudo apt update sudo apt install docker.io docker-compose
方法二:替换为正确的Docker Debian官方源
如果需要使用Docker官方最新版本,按以下步骤操作:
- 删除错误的源文件
找到Docker的源配置文件并删除:sudo rm /etc/apt/sources.list.d/docker.list - 确定Parrot对应的Debian版本代号
执行命令查看当前系统基于的Debian版本:
常见对应关系:Parrot LTS基于Debian 12(cat /etc/debian_versionbookworm),普通版可能基于Debian 11(bullseye)。 - 添加Docker官方Debian源
- 安装必要依赖:
sudo apt install apt-transport-https ca-certificates curl gnupg-agent software-properties-common - 导入Docker GPG密钥:
curl -fsSL https://download.docker.com/linux/debian/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg - 添加适配的Debian源(将
bookworm替换为你查到的版本代号):echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/debian bookworm stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
- 安装必要依赖:
- 更新并安装Docker
sudo apt update sudo apt install docker-ce docker-ce-cli containerd.io
内容的提问来源于stack exchange,提问作者Skotchi Athaalabiy
相关产品推荐
相关产品推荐

