步骤 1 · 在 Termux 中执行
安装 Ubuntu
把下面这条命令复制到 Termux 里直接运行:
curl -fsSL https://u.quanxin.edu.kg/termux-ubuntu-autoinstall.sh | bash
执行完成后,重新打开 Termux 会自动进入 Ubuntu。
这个页面把整个流程合在一起了。你只需要按顺序复制两条命令:先在 Termux 里装 Ubuntu,再进入 Ubuntu 安装 OpenClaw + Codex CLI。
把下面这条命令复制到 Termux 里直接运行:
curl -fsSL https://u.quanxin.edu.kg/termux-ubuntu-autoinstall.sh | bash
进入 Ubuntu 后,再执行这条命令:
curl -fsSL https://u.quanxin.edu.kg/ubuntu-openclaw-codex-install.sh | bash
bash ~/start-ubuntu.shbash ~/start-openclaw-gateway.shbash ~/openclaw-status.shproot-distro、部署 Ubuntu、装常用工具,并写入自动进入 Ubuntu 的启动配置。curl 因 OpenSSL / ngtcp2 组合损坏而无法运行,脚本会先尝试自动修复;如果仍异常,会临时切到 wget 兼容包装器继续安装。openclaw 与 @openai/codex,并在运行时要求你输入自己的 Base URL 和 API Key,再写入 ~/.codex 与 ~/.openclaw 配置文件。说明你少了 | bash。正确写法必须是:
curl -fsSL https://u.quanxin.edu.kg/termux-ubuntu-autoinstall.sh | bash
这是 Termux 里 apt 之前留下的半配置状态。先修复,再重新执行步骤 1:
dpkg --force-confold --configure -a && apt -o Dpkg::Options::="--force-confold" -o Dpkg::Options::="--force-confdef" --fix-broken install -y
这是手机网络、代理或镜像波动导致。脚本已经内置 HTTPS、重试、超时和自恢复。通常直接重跑即可:
curl -fsSL https://u.quanxin.edu.kg/termux-ubuntu-autoinstall.sh | bash
如果你是在 Ubuntu 里装 OpenClaw/Codex 时遇到这个问题,就重跑第二条安装命令。
这是 Termux 本机的 curl / openssl / ngtcp2 组合损坏,不是 Ubuntu rootfs 本身坏了。最新版安装脚本会先尝试自动修复;修不好时会临时切到 wget 兼容模式继续安装。
apt install --reinstall -y openssl curl ca-certificates libngtcp2 libnghttp3
如果你想把被替换的 curl 恢复为系统包原版,可执行:
bash ~/restore-termux-curl.sh
这是旧版本脚本在 root 场景下的问题。现在已经修复。请直接重新执行最新安装命令:
curl -fsSL https://u.quanxin.edu.kg/ubuntu-openclaw-codex-install.sh | bash
说明你本地还是旧的启动脚本。先执行修复补丁:
curl -fsSL https://u.quanxin.edu.kg/fix-openclaw-launcher.sh | bash