repo init报错

2021-08-17  本文已影响0人  技术笔记
$ repo init -u url
warning: Python 3 support is currently experimental. YMMV.
Please use Python 2.6 - 2.7 instead.
Traceback (most recent call last):
  File "/usr/bin/repo", line 886, in <module>
    main(sys.argv[1:])
  File "/usr/bin/repo", line 854, in main
    _Init(args, gitc_init=(cmd == 'gitc-init'))
  File "/usr/bin/repo", line 340, in _Init
    _CheckGitVersion()
  File "/usr/bin/repo", line 394, in _CheckGitVersion
    ver_act = ParseGitVersion(ver_str)
  File "/usr/bin/repo", line 364, in ParseGitVersion
    if not ver_str.startswith('git version '):
TypeError: startswith first arg must be bytes or a tuple of bytes, not str

修改repo文件就可以:
$ sudo vi /usr/bin/repo
修改
#!/usr/bin/python#!/usr/bin/python2即可。

上一篇下一篇

猜你喜欢

热点阅读