Firefly开源社区

打印 上一主题 下一主题

[Linux] 源码同步出问题

13

积分

0

威望

0

贡献

技术小白

积分
13

源码同步出问题

发表于 2021-11-12 19:03:30      浏览:7149 | 回复:5        打印      只看该作者   [复制链接] 楼主
我的平台是ubuntu20.04的,下载了rk3399pro的linux版本的源码,解压后.repo/repo/repo sync -l提示完成,但在.repo/repo/repo sync -c --no-tags时,出现的错误信息如下:希望得到大神帮助
warning: Python 3 support is currently experimental. YMMV.
Please use Python 2.6 - 2.7 instead.
/media/zhang/265c26d4-df61-48f3-a632-015e21d8826a/source/rk3399pro_linux_release_v2.5.1_20210304/.repo/repo/main.py:19: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses
  import imp
Fetching project external/minilogger
Fetching project external/rknpu-fw
Fetching project yocto/meta-python2
Fetching project kernel
Fetching project external/rknn-toolkit
Fetching project debian
Fetching project external/rockx
error: Cannot fetch external/minilogger (AttributeError: 'str' object has no attribute 'decode')
Exception in thread Thread-1:
Fetching project buildroot-dl
error: Cannot fetch external/rknpu-fw (AttributeError: 'str' object has no attribute 'decode')
error: Cannot fetch yocto/meta-python2 (AttributeError: 'str' object has no attribute 'decode')
Exception in thread Thread-2:
Exception in thread Thread-3:
Traceback (most recent call last):
Traceback (most recent call last):
  File "/usr/lib/python3.8/threading.py", line 932, in _bootstrap_inner
Traceback (most recent call last):
  File "/usr/lib/python3.8/threading.py", line 932, in _bootstrap_inner
  File "/usr/lib/python3.8/threading.py", line 932, in _bootstrap_inner
    self.run()
    self.run()
  File "/usr/lib/python3.8/threading.py", line 870, in run
    self.run()
  File "/usr/lib/python3.8/threading.py", line 870, in run
  File "/usr/lib/python3.8/threading.py", line 870, in run
    self._target(*self._args, **self._kwargs)
    self._target(*self._args, **self._kwargs)
  File "/media/zhang/265c26d4-df61-48f3-a632-015e21d8826a/source/rk3399pro_linux_release_v2.5.1_20210304/.repo/repo/subcmds/sync.py", line 270, in _FetchProjectList
  File "/media/zhang/265c26d4-df61-48f3-a632-015e21d8826a/source/rk3399pro_linux_release_v2.5.1_20210304/.repo/repo/subcmds/sync.py", line 270, in _FetchProjectList
    self._target(*self._args, **self._kwargs)
    success = self._FetchHelper(opt, project, *args, **kwargs)
  File "/media/zhang/265c26d4-df61-48f3-a632-015e21d8826a/source/rk3399pro_linux_release_v2.5.1_20210304/.repo/repo/subcmds/sync.py", line 307, in _FetchHelper
    success = self._FetchHelper(opt, project, *args, **kwargs)
  File "/media/zhang/265c26d4-df61-48f3-a632-015e21d8826a/source/rk3399pro_linux_release_v2.5.1_20210304/.repo/repo/subcmds/sync.py", line 270, in _FetchProjectList
  File "/media/zhang/265c26d4-df61-48f3-a632-015e21d8826a/source/rk3399pro_linux_release_v2.5.1_20210304/.repo/repo/subcmds/sync.py", line 307, in _FetchHelper
    success = project.Sync_NetworkHalf(
    success = self._FetchHelper(opt, project, *args, **kwargs)
    success = project.Sync_NetworkHalf(
  File "/media/zhang/265c26d4-df61-48f3-a632-015e21d8826a/source/rk3399pro_linux_release_v2.5.1_20210304/.repo/repo/subcmds/sync.py", line 307, in _FetchHelper
  File "/media/zhang/265c26d4-df61-48f3-a632-015e21d8826a/source/rk3399pro_linux_release_v2.5.1_20210304/.repo/repo/project.py", line 1229, in Sync_NetworkHalf
  File "/media/zhang/265c26d4-df61-48f3-a632-015e21d8826a/source/rk3399pro_linux_release_v2.5.1_20210304/.repo/repo/project.py", line 1229, in Sync_NetworkHalf
    success = project.Sync_NetworkHalf(
  File "/media/zhang/265c26d4-df61-48f3-a632-015e21d8826a/source/rk3399pro_linux_release_v2.5.1_20210304/.repo/repo/project.py", line 1229, in Sync_NetworkHalf
    self._InitGitDir(force_sync=force_sync)
  File "/media/zhang/265c26d4-df61-48f3-a632-015e21d8826a/source/rk3399pro_linux_release_v2.5.1_20210304/.repo/repo/project.py", line 2298, in _InitGitDir
    self._InitGitDir(force_sync=force_sync)
    self._InitGitDir(force_sync=force_sync)
  File "/media/zhang/265c26d4-df61-48f3-a632-015e21d8826a/source/rk3399pro_linux_release_v2.5.1_20210304/.repo/repo/project.py", line 2298, in _InitGitDir
  File "/media/zhang/265c26d4-df61-48f3-a632-015e21d8826a/source/rk3399pro_linux_release_v2.5.1_20210304/.repo/repo/project.py", line 2298, in _InitGitDir
    self.config.SetString('filter.lfs.smudge', 'git-lfs smudge --skip -- %f')
    self.config.SetString('filter.lfs.smudge', 'git-lfs smudge --skip -- %f')
  File "/media/zhang/265c26d4-df61-48f3-a632-015e21d8826a/source/rk3399pro_linux_release_v2.5.1_20210304/.repo/repo/git_config.py", line 158, in SetString
    self.config.SetString('filter.lfs.smudge', 'git-lfs smudge --skip -- %f')
  File "/media/zhang/265c26d4-df61-48f3-a632-015e21d8826a/source/rk3399pro_linux_release_v2.5.1_20210304/.repo/repo/git_config.py", line 158, in SetString
  File "/media/zhang/265c26d4-df61-48f3-a632-015e21d8826a/source/rk3399pro_linux_release_v2.5.1_20210304/.repo/repo/git_config.py", line 158, in SetString
    old = self._cache[key]
  File "/media/zhang/265c26d4-df61-48f3-a632-015e21d8826a/source/rk3399pro_linux_release_v2.5.1_20210304/.repo/repo/git_config.py", line 248, in _cache
    old = self._cache[key]
  File "/media/zhang/265c26d4-df61-48f3-a632-015e21d8826a/source/rk3399pro_linux_release_v2.5.1_20210304/.repo/repo/git_config.py", line 248, in _cache
    old = self._cache[key]
  File "/media/zhang/265c26d4-df61-48f3-a632-015e21d8826a/source/rk3399pro_linux_release_v2.5.1_20210304/.repo/repo/git_config.py", line 248, in _cache
    self._cache_dict = self._Read()
  File "/media/zhang/265c26d4-df61-48f3-a632-015e21d8826a/source/rk3399pro_linux_release_v2.5.1_20210304/.repo/repo/git_config.py", line 254, in _Read
    self._cache_dict = self._Read()
    self._cache_dict = self._Read()
  File "/media/zhang/265c26d4-df61-48f3-a632-015e21d8826a/source/rk3399pro_linux_release_v2.5.1_20210304/.repo/repo/git_config.py", line 254, in _Read
  File "/media/zhang/265c26d4-df61-48f3-a632-015e21d8826a/source/rk3399pro_linux_release_v2.5.1_20210304/.repo/repo/git_config.py", line 254, in _Read
    d = self._ReadGit()
    d = self._ReadGit()
  File "/media/zhang/265c26d4-df61-48f3-a632-015e21d8826a/source/rk3399pro_linux_release_v2.5.1_20210304/.repo/repo/git_config.py", line 299, in _ReadGit
  File "/media/zhang/265c26d4-df61-48f3-a632-015e21d8826a/source/rk3399pro_linux_release_v2.5.1_20210304/.repo/repo/git_config.py", line 299, in _ReadGit
    d = self._ReadGit()
    for line in d.decode('utf-8').rstrip('\0').split('\0'):  # pylint: disable=W1401
AttributeError: 'str' object has no attribute 'decode'
    for line in d.decode('utf-8').rstrip('\0').split('\0'):  # pylint: disable=W1401
AttributeError: 'str' object has no attribute 'decode'
  File "/media/zhang/265c26d4-df61-48f3-a632-015e21d8826a/source/rk3399pro_linux_release_v2.5.1_20210304/.repo/repo/git_config.py", line 299, in _ReadGit
    for line in d.decode('utf-8').rstrip('\0').split('\0'):  # pylint: disable=W1401
AttributeError: 'str' object has no attribute 'decode'
回复

使用道具 举报

899

积分

0

威望

6

贡献

技术大神

Rank: 8Rank: 8

积分
899
发表于 2021-11-15 11:35:05        只看该作者  沙发
你告诉我python2和python3的版本是多少
python --version
python3 --version
,不过据我同事反映ubuntu20.04的deb包支持不是很完善的,能同步代码也不能编译。需要装个docker虚拟出ubuntu18.04编译。要不你就直接使用docker技术。
回复

使用道具 举报

13

积分

0

威望

0

贡献

技术小白

积分
13
发表于 2021-11-15 14:26:33        只看该作者  板凳
python --version返回3.8.10
回复

使用道具 举报

13

积分

0

威望

0

贡献

技术小白

积分
13
发表于 2021-11-15 14:29:34        只看该作者  地板
有没ubuntu18.04的源代码?
回复

使用道具 举报

37

积分

0

威望

0

贡献

技术小白

积分
37
发表于 2021-11-15 15:43:39        只看该作者  5#
rk3399在ubuntu20.04.2可正常同步编译,没有问题
回复

使用道具 举报

899

积分

0

威望

6

贡献

技术大神

Rank: 8Rank: 8

积分
899
发表于 2021-11-15 17:07:42        只看该作者  6#
dh_zhang 发表于 2021-11-15 14:26
python --version返回3.8.10

原因好像是repo仓库没更新
我在.repo/repo/里面执行git pull之后就好了
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

友情链接 : 爱板网 电子发烧友论坛 云汉电子社区 粤ICP备14022046号-2
快速回复 返回顶部 返回列表