设置默认编辑器
export EDITOR=nano 或
export EDITOR=vim (若未安装vim,先安装:pkg install vim)
编辑源文件
apt edit-sources
将原来的https://termux.net官方源替换为
http://mirrors.tuna.tsinghua.edu.cn/termux
uname -m 查看手机架构
uname -a 查看版本信息
源前面加上***[arch=all,手机架构]***
最后更新一下
更新,来自国光大佬的自动替换源,命令:
sed -i 's@^\(deb.*stable main\)$@#\1\ndeb https://mirrors.tuna.tsinghua.edu.cn/termux/termux-packages-24 stable main@' $PREFIX/etc/apt/sources.list
sed -i 's@^\(deb.*games stable\)$@#\1\ndeb https://mirrors.tuna.tsinghua.edu.cn/termux/game-packages-24 games stable@' $PREFIX/etc/apt/sources.list.d/game.list
sed -i 's@^\(deb.*science stable\)$@#\1\ndeb https://mirrors.tuna.tsinghua.edu.cn/termux/science-packages-24 science stable@' $PREFIX/etc/apt/sources.list.d/science.list
pkg update