@@ -9,6 +9,8 @@ Docker 不仅支持 `x86_64` 架构的计算机,同时也支持 `ARM` 架构
9
9
Docker 支持以下版本的 [ Raspberry Pi OS] ( https://www.raspberrypi.org/software/operating-systems/ ) 操作系统:
10
10
11
11
* Raspberry Pi OS Buster
12
+ * Raspberry Pi OS Bullseye
13
+ * Raspberry Pi OS Bookworm
12
14
13
15
* 注:* ` Raspberry Pi OS ` 由树莓派的开发与维护机构 [ 树莓派基金会] ( https://www.raspberrypi.org/ ) 官方支持,并推荐用作树莓派的首选系统,其基于 ` Debian ` 。
14
16
@@ -58,6 +60,33 @@ $ sudo add-apt-repository \
58
60
59
61
> 以上命令会添加稳定版本的 Docker APT 源,如果需要测试版本的 Docker 请将 stable 改为 test。
60
62
63
+ #### 报错解决办法
64
+
65
+ 在 ` Raspberry Pi OS Bullseye/Bookworm ` 中,添加 Docker 软件源的步骤可能会出现如下报错:
66
+
67
+ ``` bash
68
+ Traceback (most recent call last):
69
+ File " /usr/bin/add-apt-repository" , line 95, in < module>
70
+ sp = SoftwareProperties(options=options)
71
+ File " /usr/lib/python3/dist-packages/softwareproperties/SoftwareProperties.py" , line 109, in __init__
72
+ self.reload_sourceslist ()
73
+ File " /usr/lib/python3/dist-packages/softwareproperties/SoftwareProperties.py" , line 599, in reload_sourceslist
74
+ self.distro.get_sources(self.sourceslist)
75
+ File " /usr/lib/python3/dist-packages/aptsources/distro.py" , line 91, in get_sources
76
+ raise NoDistroTemplateException(
77
+ aptsources.distro.NoDistroTemplateException: Error: could not find a distribution template for Raspbian/bullseye
78
+ ` ` `
79
+
80
+ 通过以下命令手动添加镜像源到 ` /etc/apt/sources.list` 文件中即可解决:
81
+
82
+ ` ` ` bash
83
+ $ sudo echo " deb [arch=armhf] https://mirrors.aliyun.com/docker-ce/linux/raspbian $( lsb_release -cs) stable" | sudo tee -a /etc/apt/sources.list
84
+
85
+
86
+ # 官方源
87
+ # $ sudo echo "deb [arch=armhf] https://download.docker.com/linux/raspbian $(lsb_release -cs) stable" | sudo tee -a /etc/apt/sources.list
88
+ ` ` `
89
+
61
90
# ## 安装 Docker
62
91
63
92
更新 apt 软件包缓存,并安装 ` docker-ce` 。
0 commit comments