Termux备忘录 2020-09-26 技巧,实验 1 条评论 1530 次阅读 # 改国内源 ## termux 参考:[神器Termux的使用日常](https://www.jianshu.com/p/5c8678cef499) 参考:[Termux 镜像使用帮助](https://mirrors.tuna.tsinghua.edu.cn/help/termux/) **手动修改:** ``` export EDITOR=vi apt edit-sources ``` 把列表改为: ``` deb https://mirrors.tuna.tsinghua.edu.cn/termux stable main ``` **自动修改:** ``` 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 apt update && apt upgrade ``` ## Debian 参考:[Debian 镜像使用帮助](https://mirror.tuna.tsinghua.edu.cn/help/debian/) ``` apt install apt-transport-https ca-certificates export EDITOR=vi apt edit-sources ``` 把列表改为: ``` # 默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释 deb https://mirrors.tuna.tsinghua.edu.cn/debian/ buster main contrib non-free # deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ buster main contrib non-free deb https://mirrors.tuna.tsinghua.edu.cn/debian/ buster-updates main contrib non-free # deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ buster-updates main contrib non-free deb https://mirrors.tuna.tsinghua.edu.cn/debian/ buster-backports main contrib non-free # deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ buster-backports main contrib non-free deb https://mirrors.tuna.tsinghua.edu.cn/debian-security buster/updates main contrib non-free # deb-src https://mirrors.tuna.tsinghua.edu.cn/debian-security buster/updates main contrib non-free ``` # linux查看系统配置命令: `neofetch` # python、pip链接到python3、pip3 参考:[linux下将pip命令默认指向为pip3](https://blog.csdn.net/a3335581/article/details/106808188/) ``` mv /usr/bin/python /usr/bin/python.bak mv /usr/bin/pip /usr/bin/pip.bak ln -s /usr/bin/python3 /usr/bin/python ln -s /usr/bin/pip3 /usr/bin/pip ``` # 安装pytorch报错(待解决) ## 第一步:装lxml 参考:[Ubuntu/Debian 安装lxml的正确方式](https://blog.csdn.net/weixin_30822451/article/details/95360875) ``` apt-get install libxml2-dev libxslt-dev apt-get install python3-lxml ``` ## 第二步:安装zlib 参考:[debian 下安装nginx时PCRE库、zlib库、OpenSSL库的安装](https://www.jianshu.com/p/d4ebc1d8a07d) `apt-get install zlib1g-dev` ## 第三步:安装libjpeg 参考:[debian 下安装nginx时PCRE库、zlib库、OpenSSL库的安装](https://www.jianshu.com/p/d4ebc1d8a07d) `apt-get install libjpeg-dev` ## 安装Jupyter ### 安装cffi报错 直接pip安装cffi会报错。 先安装libcffi-dev,再pip安装cffi就不报错了。 `apt install libffi-dev` `pip install cffi` 标签: 边缘计算, 备忘录 本作品采用 知识共享署名-相同方式共享 4.0 国际许可协议 进行许可。
termux安装过一次Ubuntu,太卡了受不了