Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update to bookworm #234

Merged
merged 2 commits into from
Oct 15, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 9 additions & 5 deletions source/raspberrypi.rst
Original file line number Diff line number Diff line change
Expand Up @@ -39,20 +39,24 @@ https://mirrors.ustc.edu.cn/archive.raspberrypi.org/ 或 https://mirrors.ustc.ed
.. warning::
操作前请做好相应备份

一般情况下,将 :file:`/etc/apt/sources.list.d/raspi.list` 文件中默认的源地址 ``http://archive.raspberrypi.org/`` 替换为 ``http://mirrors.ustc.edu.cn/archive.raspberrypi.org/`` 即可。
一般情况下,将 :file:`/etc/apt/sources.list.d/raspi.list` 文件中默认的源地址 ``http://archive.raspberrypi.org/``\ (bullseye 及之前版本)或者 ``http://archive.raspberrypi.com/``\ (bookworm 及之后版本)替换为 ``http://mirrors.ustc.edu.cn/raspberrypi/`` 即可。

可以使用如下命令:

::

sudo sed -i 's|//archive.raspberrypi.org|//mirrors.ustc.edu.cn/archive.raspberrypi.org|g' /etc/apt/sources.list.d/raspi.list
sudo sed \
-e 's|http://archive.raspberrypi.org|http://mirrors.ustc.edu.cn/raspberrypi|g' \
-e 's|http://archive.raspberrypi.com|http://mirrors.ustc.edu.cn/raspberrypi|g' \
-i.bak \
/etc/apt/sources.list.d/raspi.list

当然也可以直接编辑 :file:`/etc/apt/sources.list.d/raspi.list` 文件(需要使用 sudo)。以下是 Bullseye 的参考配置内容:
当然也可以直接编辑 :file:`/etc/apt/sources.list.d/raspi.list` 文件(需要使用 sudo)。以下是 bookworm 的参考配置内容:

::

deb http://mirrors.ustc.edu.cn/archive.raspberrypi.org/debian/ bullseye main ui
#deb-src http://mirrors.ustc.edu.cn/archive.raspberrypi.org/debian/ bullseye main ui
deb http://mirrors.ustc.edu.cn/raspberrypi/debian/ bookworm main
#deb-src http://mirrors.ustc.edu.cn/raspberrypi/debian/ bookworm main

更改完 :file:`raspi.list` 文件后请运行 ``sudo apt-get update`` 更新索引以生效。

Expand Down