在Debian12下使用aapanel无法安装Docker记录

130次阅读
没有评论

共计 3049 个字符,预计需要花费 8 分钟才能阅读完成。

Debian 和 aapanel 为最新版本,在 aapanel 里面点击左侧栏的 Docker 然后安装,会提示错误信息如下

--2023-08-15 16:26:36-- https://node.aapanel.com/install/0/docker_install_en.sh
Resolving node.aapanel.com (node.aapanel.com)... 104.21.79.196, 172.67.171.7, 2606:4700:3034::ac43:ab07, ...
Connecting to node.aapanel.com (node.aapanel.com)|104.21.79.196|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 16976 (17K) [application/octet-stream]
Saving to:‘docker_install_en.sh’0K .......... ...... 100% 2.72M=0.006s

2023-08-15 16:26:36 (2.72 MB/s) -‘docker_install_en.sh’saved [16976/16976]

selecting download node...
https://download.bt.cn
{"product": "Linux panel", "setup_path": "/www/server", "openlitespeed_path": "/usr/local", "language": "English", "title": "aaPanel Linux panel", "brand": "aaPanel", "root_path": "/www", "template": "default", "logs_path": "/www/wwwlogs", "home": "https://www.aapanel.com", "recycle_bin": true}
https://node.aapanel.com

cat: /etc/redhat-release: No such file or directory
cat: /etc/redhat-release: No such file or directory
Hit:1 http://deb.debian.org/debian bookworm InRelease
Hit:2 http://security.debian.org/debian-security bookworm-security InRelease
Hit:3 http://deb.debian.org/debian bookworm-updates InRelease
Hit:4 http://ftp.debian.org/debian bookworm-backports InRelease
Get:5 https://download.docker.com/linux/debian bookworm InRelease [43.3 kB]
Get:6 https://download.docker.com/linux/debian bookworm/stable amd64 Packages [11.9 kB]
Fetched 55.3 kB in 1s (78.9 kB/s)
Reading package lists...
Reading package lists...
Building dependency tree...
Reading state information...
apt-transport-https is already the newest version (2.6.1).
ca-certificates is already the newest version (20230311).
curl is already the newest version (7.88.1-10+deb12u1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Hit:1 http://deb.debian.org/debian bookworm InRelease
Hit:2 http://security.debian.org/debian-security bookworm-security InRelease
Hit:3 http://ftp.debian.org/debian bookworm-backports InRelease
Ign:4 https://mirrors.aliyun.com/docker-ce/linux/debian 12 InRelease
Hit:5 http://deb.debian.org/debian bookworm-updates InRelease
Err:6 https://mirrors.aliyun.com/docker-ce/linux/debian 12 Release
404 Not Found [IP: 120.233.175.249 443]
Reading package lists...
E: The repository 'https://mirrors.aliyun.com/docker-ce/linux/debian 12 Release' does not have a Release file.
Reading package lists...
Building dependency tree...
Reading state information...
Package docker-ce is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

关键应该是下面这句,大致意思就是阿里云镜像源的存储库中找不到 Release 文件

E: The repository 'https://mirrors.aliyun.com/docker-ce/linux/debian 12 Release' does not have a Release file.

找到问题,那思路就是,不用阿里云,直接用 docker 官方的,使用下面两行代码在 ssh 里面执行

# 添加 GPG 公钥
curl -sSL https://download.docker.com/linux/debian/gpg | gpg --dearmor > /usr/share/keyrings/docker-ce.gpg
# 添加 apt docker 源
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-ce.gpg] https://download.docker.com/linux/debian $(lsb_release -sc) stable" > /etc/apt/sources.list.d/docker.list

然后更新源再安装 docker,安装成功后,aapanel 面板就可以正常肯定 docker 运行了

# 更新软件包
apt update
# 安装 Docker
apt install docker-ce docker-ce-cli containerd.io docker-compose-plugin

正文完
 
Hlynford
版权声明:本站原创文章,由 Hlynford 2023-08-15发表,共计3049字。
转载说明:除特殊说明外本站文章皆由CC-4.0协议发布,转载请注明出处。
评论(没有评论)