From c420f883b85fb1ed52acf4c7dc1188dce492176c Mon Sep 17 00:00:00 2001 From: bananaxiao2333 <1933288986@qq.com> Date: Sat, 22 Nov 2025 23:56:56 +0800 Subject: [PATCH 1/6] fix: astrbot termux proot-distro install python310 runtime with miniconda --- zh/deploy/astrbot/termux.md | 43 +++++++++++++++---------------------- 1 file changed, 17 insertions(+), 26 deletions(-) diff --git a/zh/deploy/astrbot/termux.md b/zh/deploy/astrbot/termux.md index 1317fc9..d47aa62 100644 --- a/zh/deploy/astrbot/termux.md +++ b/zh/deploy/astrbot/termux.md @@ -83,35 +83,26 @@ proot-distro login ubuntu 此时便进入了`Ubuntu环境`,我们需使用`apt`命令安装软件包了 -## 添加第三方PPA +## 安装python环境 ->[!TIP] ->`Python 3.10`并不在官方的软件源中,而`uv`所要求的Python版本为3.10 ,所以进行此步为必须 - -### 使用`apt`安装`software-properties-common` (添加PPA前置) - - - - - -```bash -apt update && apt install software-properties-common -``` - -### 添加`deadsnakes`PPA(Python官方维护) +全部复制以下语句中运行,即可自动安装python3.10 + ```bash -add-apt-repository ppa:deadsnakes/ppa && apt update -``` - -添加时你可能会看到:`Press [ENTER] to continue or Ctrl-c to cancel.` ,此时按下回车(换行)即可 - -## 安装 `Python` - -在进行完以上步骤后,即可安装`Python 3.10` - -```bash -apt install python3.10 +cat > install-py310.sh << EOF +echo -e "\e[32m 开始安装python3.10 \e[0m - ASTRBOT" +apt update +apt install wget -y +export SHELL=/bin/bash +export miniconda_version="Miniconda3-py310_25.9.1-3-Linux-aarch64.sh" +wget https://mirrors.tuna.tsinghua.edu.cn/anaconda/miniconda/${miniconda_version} +chmod +x $miniconda_version +./$miniconda_version -bcu +source ~/.bashrc +echo -e "\e[32m 成功安装: \e[0m" +python --version +EOF +chmod +x install-py310.sh&&./install-py310.sh ``` ## 克隆 `AstrBot` 仓库 From 4ba377680480326fa5d479a47298226b00f4089b Mon Sep 17 00:00:00 2001 From: bananaxiao2333 <1933288986@qq.com> Date: Sun, 23 Nov 2025 00:16:33 +0800 Subject: [PATCH 2/6] fix: add official miniconda source and auto switch x86_64/aarch64 --- zh/deploy/astrbot/termux.md | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/zh/deploy/astrbot/termux.md b/zh/deploy/astrbot/termux.md index d47aa62..96845db 100644 --- a/zh/deploy/astrbot/termux.md +++ b/zh/deploy/astrbot/termux.md @@ -85,7 +85,11 @@ proot-distro login ubuntu ## 安装python环境 -全部复制以下语句中运行,即可自动安装python3.10 + +脚本默认使用清华源下载,如不可用则可以尝试官方源: +> `https://mirrors.tuna.tsinghua.edu.cn/anaconda/miniconda/`替换为`https://repo.anaconda.com/miniconda/` + +全部复制以下语句中运行 ```bash @@ -94,7 +98,7 @@ echo -e "\e[32m 开始安装python3.10 \e[0m - ASTRBOT" apt update apt install wget -y export SHELL=/bin/bash -export miniconda_version="Miniconda3-py310_25.9.1-3-Linux-aarch64.sh" +export miniconda_version="Miniconda3-py310_25.9.1-3-Linux-$(uname -m).sh" wget https://mirrors.tuna.tsinghua.edu.cn/anaconda/miniconda/${miniconda_version} chmod +x $miniconda_version ./$miniconda_version -bcu @@ -105,6 +109,8 @@ EOF chmod +x install-py310.sh&&./install-py310.sh ``` +如果安装成功,则可以在终端中看到`Python 3.10.19` + ## 克隆 `AstrBot` 仓库 直到这里,您所处的路径应为 `~#` 而不是其他次级目录,以防找不到项目目录 From 237dc0c6361597de66b56ab211db0bc680bd4c43 Mon Sep 17 00:00:00 2001 From: bananaxiao2333 <1933288986@qq.com> Date: Sun, 23 Nov 2025 00:24:08 +0800 Subject: [PATCH 3/6] feat: add PD_OVERRIDE_TARBALL to boost download speed for ubuntu installation --- zh/deploy/astrbot/termux.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/zh/deploy/astrbot/termux.md b/zh/deploy/astrbot/termux.md index 96845db..c9254d0 100644 --- a/zh/deploy/astrbot/termux.md +++ b/zh/deploy/astrbot/termux.md @@ -66,6 +66,12 @@ pkg install uv git proot-distro >[!TIP] >中国大陆概率访问`GitHub`,故建议使用加速器或代理 +> +>或者也可以执行这两条指令来使用镜像 +>```bash +>export PD_OVERRIDE_TARBALL_URL=https://ghfast.top/github.com/termux/proot-distro/releases/download/v4.30.1/ubuntu-questing-aarch64-pd-v4.30.1.tar.xz +>export PD_OVERRIDE_TARBALL_SHA256=5ab35b90cd9a9f180656261ba400a135c4c01c2da4b74522118342f985c2d328 +>``` ```bash proot-distro install ubuntu From 6d405dff88b34d42a232cafcd5781655e0f75ad7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=8F=E9=A6=99=E8=95=892333?= <162992527+bananaxiao2333@users.noreply.github.com> Date: Sun, 23 Nov 2025 00:34:59 +0800 Subject: [PATCH 4/6] Update zh/deploy/astrbot/termux.md Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com> --- zh/deploy/astrbot/termux.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zh/deploy/astrbot/termux.md b/zh/deploy/astrbot/termux.md index c9254d0..cba0a7e 100644 --- a/zh/deploy/astrbot/termux.md +++ b/zh/deploy/astrbot/termux.md @@ -95,7 +95,7 @@ proot-distro login ubuntu 脚本默认使用清华源下载,如不可用则可以尝试官方源: > `https://mirrors.tuna.tsinghua.edu.cn/anaconda/miniconda/`替换为`https://repo.anaconda.com/miniconda/` -全部复制以下语句中运行 +全部复制以下语句后运行 ```bash From 141790a1f794b824a09b99e91a9f4c7185b73b58 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=8F=E9=A6=99=E8=95=892333?= <162992527+bananaxiao2333@users.noreply.github.com> Date: Sun, 23 Nov 2025 00:35:09 +0800 Subject: [PATCH 5/6] Update zh/deploy/astrbot/termux.md Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com> --- zh/deploy/astrbot/termux.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zh/deploy/astrbot/termux.md b/zh/deploy/astrbot/termux.md index cba0a7e..0bcbff3 100644 --- a/zh/deploy/astrbot/termux.md +++ b/zh/deploy/astrbot/termux.md @@ -97,7 +97,7 @@ proot-distro login ubuntu 全部复制以下语句后运行 - + ```bash cat > install-py310.sh << EOF echo -e "\e[32m 开始安装python3.10 \e[0m - ASTRBOT" From 3ac49f0378dea7772752bde95942a3d94b3d4c32 Mon Sep 17 00:00:00 2001 From: Sjshi763 Date: Fri, 28 Nov 2025 19:55:15 +0800 Subject: [PATCH 6/6] =?UTF-8?q?fix:=20=E7=A7=BB=E5=8A=A8=20proot-distro=20?= =?UTF-8?q?=E5=AE=89=E8=A3=85=E5=91=BD=E4=BB=A4=E8=87=B3=E6=AD=A3=E7=A1=AE?= =?UTF-8?q?=E4=BD=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- zh/deploy/astrbot/termux.md | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/zh/deploy/astrbot/termux.md b/zh/deploy/astrbot/termux.md index 0bcbff3..6b6d999 100644 --- a/zh/deploy/astrbot/termux.md +++ b/zh/deploy/astrbot/termux.md @@ -63,6 +63,9 @@ pkg install uv git proot-distro ``` ### 使用 `proot-distro` 安装 `ubuntu环境` +```bash +proot-distro install ubuntu +``` >[!TIP] >中国大陆概率访问`GitHub`,故建议使用加速器或代理 @@ -73,10 +76,6 @@ pkg install uv git proot-distro >export PD_OVERRIDE_TARBALL_SHA256=5ab35b90cd9a9f180656261ba400a135c4c01c2da4b74522118342f985c2d328 >``` -```bash -proot-distro install ubuntu -``` - ### 登录 `Ubuntu环境` 下载及配置完成会有提示`Log in with: proot-distro login ubuntu`,输入相同的即可登入