repo工具的安装,按照:AOSP 镜像使用帮助 — USTC Mirror Help 文档 中的如下步骤执行命令即可:
mkdir ~/bin
PATH=~/bin:$PATH
curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
## 如果上述 URL 不可访问,可以用下面的:
## curl -sSL 'https://gerrit-googlesource.proxy.ustclug.org/git-repo/+/master/repo?format=TEXT' |base64 -d > ~/bin/repo
chmod a+x ~/bin/repo
repo init 指令初始化时,有可能碰到默认 python 版本不对的情况,按照该文章中的说明进行修改即可:Linux修改默认Python版本_KpNBtM的博客-CSDN博客_linux设置默认python版本repo init 报错Cannot get https://gerrit.googlesource.com/git-repo/clone.bundle
repo init 的时候,默认会去谷歌服务器同步最新版本的repo工具,而如果当前网络不支持翻墙,就会出现该报错,解决方法按文章中的 update 方式进行修改即可:repo init报错Cannot get https://gerrit.googlesource.com/git-repo/clone.bundle_feiniao8651的博客-CSDN博客