repo init fails with "file=sys.stderr"
Dec 22, 2021 asked by anonymous
Question / Issue:
Do you have a fix for running "repo init" on Ubuntu 20.04? It is failing at: <path>/.repo/repo/main.py", line 79 file=sys.stderr) The repo script was installed by the Ubuntu distribution.
Date: Dec. 22, 2021
Author: Mind Chasers
It is evidently an issue with an interaction between python3 and python2 using the repo script provided by the Ubuntu distribution. Follow the directions for manual install on the repo home page: https://gerrit.googlesource.com/git-repo/ You can also perform a brute force upgrade at /usr/bin by overwriting repo using curl: $ sudo -i # cd /usr/bin # curl https://storage.googleapis.com/git-repo-downloads/repo > repo # chmod a+rx repo # exit $ cd <path> $ repo init ... repo has been initialized in <path>