From 9d1412c21bcc2a8193fc184bebb31459b093fe2a Mon Sep 17 00:00:00 2001 From: YadominJinta <1782397074@qq.com> Date: Sun, 12 May 2019 23:27:01 +0800 Subject: [PATCH] Modify termux's helper --- _posts/help/1970-01-01-termux.md | 33 +++----------------------------- 1 file changed, 3 insertions(+), 30 deletions(-) diff --git a/_posts/help/1970-01-01-termux.md b/_posts/help/1970-01-01-termux.md index 003bebd..b9da7ba 100644 --- a/_posts/help/1970-01-01-termux.md +++ b/_posts/help/1970-01-01-termux.md @@ -30,35 +30,8 @@ Termux 是运行在 Android 上的 terminal。不需要root,运行于内部存 使用 -``` -apt edit-sources +``` bash +sed -i 's@https://termux.net@https://mirrors.tuna.tsinghua.edu.cn/termux@' $PREFIX/etc/apt/sources.list +pkg up ``` -如果提示 - -``` -$ apt edit-sources E: Sub-process editor returned an error code (100) -``` - -则需要设置一下`$EDITOR`: - -``` -export EDITOR=vi -apt edit-sources -``` - -以 32位 ARM 平台为例,打开你常用的文本编辑器,替换成如下内容 - -``` -# The termux repository mirror from TUNA: -deb [arch=all,arm] https://mirrors.tuna.tsinghua.edu.cn/termux stable main -``` - -或通过 http 访问(不建议): - -``` -# The termux repository mirror from TUNA: -deb [arch=all,arm] http://mirrors.tuna.tsinghua.edu.cn/termux stable main -``` - -如果您用的是 64位 ARM 平台,请用 aarch64 替换 arm ;如果是 Intel 平台,则用 i686 / x86_64 分别表示 32位 和 64 位。