1

我正在关注以下链接 [安装 Chromium depot 工具。][1]

[1]:https ://commondatastorage.googleapis.com/chrome-infra-docs/flat/depot_tools/docs/html/depot_tools_tutorial.html#_setting_up获取android。

如链接中所述,我成功克隆了 depot_tools 存储库。

git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
export PATH=/path/to/depot_tools:$PATH

接下来我尝试使用以下命令获取 android

fetch android

以下是上述执行的输出

Running: gclient root
WARNING: Your metrics.cfg file was invalid or nonexistent. A new one will be created.
Running: gclient config --spec 'solutions = [
  {
    "name": "src",
    "url": "https://chromium.googlesource.com/chromium/src.git",
    "managed": False,
    "custom_deps": {},
    "custom_vars": {},
  },
]
target_os = ["android"]
'
Running: gclient sync

________ running 'git -c core.deltaBaseCacheLimit=2g clone --no-checkout --progress https://chromium.googlesource.com/chromium/src.git /home/ubuntu/abc/_gclient_src_82brwjmn' in '/home/ubuntu/abc'
Cloning into '/home/ubuntu/abc/_gclient_src_82brwjmn'...

1>WARNING: subprocess '"git" "-c" "core.deltaBaseCacheLimit=2g" "clone" "--no-checkout" "--progress" "https://chromium.googlesource.com/chromium/src.git" "/home/ubuntu/abc/_gclient_src_82brwjmn"' in /home/ubuntu/abc failed; will retry after a short nap...

________ running 'git -c core.deltaBaseCacheLimit=2g clone --no-checkout --progress https://chromium.googlesource.com/chromium/src.git /home/ubuntu/abc/_gclient_src_82brwjmn' in '/home/ubuntu/abc' attempt 2 / 4
Cloning into '/home/ubuntu/abc/_gclient_src_82brwjmn'...


1>WARNING: subprocess '"git" "-c" "core.deltaBaseCacheLimit=2g" "clone" "--no-checkout" "--progress" "https://chromium.googlesource.com/chromium/src.git" "/home/ubuntu/abc/_gclient_src_82brwjmn"' in /home/ubuntu/abc failed; will retry after a short nap...

________ running 'git -c core.deltaBaseCacheLimit=2g clone --no-checkout --progress https://chromium.googlesource.com/chromium/src.git /home/ubuntu/abc/_gclient_src_82brwjmn' in '/home/ubuntu/abc' attempt 3 / 4
Cloning into '/home/ubuntu/abc/_gclient_src_82brwjmn'...
fatal: Malformed response in ref list: c3cf127a33b227abcf63

1>WARNING: subprocess '"git" "-c" "core.deltaBaseCacheLimit=2g" "clone" "--no-checkout" "--progress" "https://chromium.googlesource.com/chromium/src.git" "/home/ubuntu/abc/_gclient_src_82brwjmn"' in /home/ubuntu/abc failed; will retry after a short nap...

________ running 'git -c core.deltaBaseCacheLimit=2g clone --no-checkout --progress https://chromium.googlesource.com/chromium/src.git /home/ubuntu/abc/_gclient_src_82brwjmn' in '/home/ubuntu/abc' attempt 4 / 4
Cloning into '/home/ubuntu/abc/_gclient_src_82brwjmn'...
1>WARNING: subprocess '"git" "-c" "core.deltaBaseCacheLimit=2g" "clone" "--no-checkout" "--progress" "https://chromium.googlesource.com/chromium/src.git" "/home/ubuntu/abc/_gclient_src_82brwjmn"' in /home/ubuntu/abc failed; will retry after a short nap...
Syncing projects: 100% ( 1/ 1) src
src (ERROR)
----------------------------------------
[0:00:00] Started.
[0:00:00] 
Traceback (most recent call last):
  File "/home/ubuntu/depot_tools/gclient_scm.py", line 1043, in _Clone
    self._Run(clone_cmd, options, cwd=self._root_dir, retry=True,
  File "/home/ubuntu/depot_tools/gclient_scm.py", line 1411, in _Run
    gclient_utils.CheckCallAndFilter(cmd, env=env, **kwargs)
  File "/home/ubuntu/depot_tools/gclient_utils.py", line 673, in CheckCallAndFilter
    raise subprocess2.CalledProcessError(
subprocess2.CalledProcessError: Command 'git -c core.deltaBaseCacheLimit=2g clone --no-checkout --progress https://chromium.googlesource.com/chromium/src.git /home/ubuntu/abc/_gclient_src_82brwjmn' returned non-zero exit status 128 in /home/ubuntu/abc
[0:25:41] _____ Conflicting directory found in /home/ubuntu/abc/src. Moving to /home/ubuntu/abc/_bad_scm/srcml99933n.
----------------------------------------


Warnings:
Conflicting directory /home/ubuntu/abc/src moved to /home/ubuntu/abc/_bad_scm/srcml99933n.
Traceback (most recent call last):
  File "/home/ubuntu/depot_tools/gclient_scm.py", line 546, in update
    self._Clone(revision, url, options)
  File "/home/ubuntu/depot_tools/gclient_scm.py", line 1043, in _Clone
    self._Run(clone_cmd, options, cwd=self._root_dir, retry=True,
  File "/home/ubuntu/depot_tools/gclient_scm.py", line 1411, in _Run
    gclient_utils.CheckCallAndFilter(cmd, env=env, **kwargs)
  File "/home/ubuntu/depot_tools/gclient_utils.py", line 673, in CheckCallAndFilter
    raise subprocess2.CalledProcessError(
subprocess2.CalledProcessError: Command 'git -c core.deltaBaseCacheLimit=2g clone --no-checkout --progress https://chromium.googlesource.com/chromium/src.git /home/ubuntu/abc/_gclient_src_82brwjmn' returned non-zero exit status 128 in /home/ubuntu/abc

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/ubuntu/.vpython-root/04a1a7/lib/python3.8/shutil.py", line 780, in move
    os.rename(src, real_dst)
FileNotFoundError: [Errno 2] No such file or directory: '/home/ubuntu/abc/src' -> '/home/ubuntu/abc/_bad_scm/srcml99933n/src'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/ubuntu/depot_tools/metrics.py", line 267, in print_notice_and_exit
    yield
  File "/home/ubuntu/depot_tools/gclient.py", line 3195, in <module>
    sys.exit(main(sys.argv[1:]))
  File "/home/ubuntu/depot_tools/gclient.py", line 3181, in main
    return dispatcher.execute(OptionParser(), argv)
  File "/home/ubuntu/depot_tools/subcommand.py", line 252, in execute
    return command(parser, args[1:])
  File "/home/ubuntu/depot_tools/gclient.py", line 2737, in CMDsync
    ret = client.RunOnDeps('update', args)
  File "/home/ubuntu/depot_tools/gclient.py", line 1779, in RunOnDeps
    work_queue.flush(revision_overrides, command, args, options=self._options,
  File "/home/ubuntu/depot_tools/gclient_utils.py", line 968, in flush
    reraise(e[0], e[1], e[2])
  File "/home/ubuntu/depot_tools/gclient_utils.py", line 67, in reraise
    raise value
  File "/home/ubuntu/depot_tools/gclient_utils.py", line 1045, in run
    self.item.run(*self.args, **self.kwargs)
  File "/home/ubuntu/depot_tools/gclient.py", line 925, in run
    self._got_revision = self._used_scm.RunCommand(command, options, args,
  File "/home/ubuntu/depot_tools/gclient_scm.py", line 132, in RunCommand
    return getattr(self, command)(options, args, file_list)
  File "/home/ubuntu/depot_tools/gclient_scm.py", line 548, in update
    self._DeleteOrMove(options.force)
  File "/home/ubuntu/depot_tools/gclient_scm.py", line 207, in _DeleteOrMove
    shutil.move(self.checkout_path, dest_path)
  File "/home/ubuntu/.vpython-root/04a1a7/lib/python3.8/shutil.py", line 794, in move
    copy_function(src, real_dst)
  File "/home/ubuntu/.vpython-root/04a1a7/lib/python3.8/shutil.py", line 426, in copy2
    copyfile(src, dst, follow_symlinks=follow_symlinks)
  File "/home/ubuntu/.vpython-root/04a1a7/lib/python3.8/shutil.py", line 259, in copyfile
    with open(src, 'rb') as fsrc, open(dst, 'wb') as fdst:
FileNotFoundError: [Errno 2] No such file or directory: '/home/ubuntu/abc/src'

Subprocess failed with return code 1.
   

我一直坚持这一点。

在这里欣赏任何线索

4

1 回答 1

1

您需要确保内存足够大。 https://chromium.googlesource.com/chromium/src/+/refs/heads/main/docs/android_build_instructions.md#system-requirements

我有同样的问题并添加内存解决了它。

于 2021-12-20T05:03:58.177 回答