【问题标题】:Why does running gclient produce update errors?为什么运行 gclient 会产生更新错误?
【发布时间】:2019-12-16 16:12:23
【问题描述】:

我根据http://commondatastorage.googleapis.com/chrome-infra-docs/flat/depot_tools/docs/html/depot_tools_tutorial.html#_setting_up克隆了depot_tools。

然后当我运行“gclient”时,我得到了这个错误:

depot_tools update failed. Conflict in /usr/v8-7.7/depot_tools
fatal: Unable to create '/usr/v8-7.7/depot_tools/.git/index.lock': Permission denied
Errors:
  failed to resolve infra/3pp/tools/git/linux-ppc64le@version:2.24.1.chromium.5 (line 27): no such package
  failed to resolve infra/3pp/tools/cpython/linux-ppc64le@version:2.7.17.chromium.22 (line 21): no such package
/usr/v8-7.7/depot_tools/bootstrap_python3: line 32: bootstrap-3.8.0.chromium.8_bin/python3/bin/python3: No such file or directory
WARNING: Your metrics.cfg file was invalid or nonexistent. A new one will be created.
Usage: gclient.py <command> [options]

Meta checkout dependency manager for Git.

我正在使用 RHEL 8 设置的 ppc64le linux 机器上运行。我的目标是尝试在机器上安装 v8,但首先 gclient 需要工作。

我的机器上确实安装了 python 2.7.15。

【问题讨论】:

    标签: v8 gclient depottools


    【解决方案1】:

    当 python3 是我的默认 python 时,我遇到了同样的错误。 gclient 可能在 python3 而不是 python2 下运行,这会导致这些错误 您可以使用pyenv 来管理python的多个并行安装。

    【讨论】:

    • 我使用update-alternatives --config python设置了python 2。
    • 该错误表明它正在拾取python3。如果您阅读 gclient 代码,您会看到它查找环境变量 GCLIENT_PY3,如果未设置为 1,则仅调用 python
    【解决方案2】:

    这是一个权限问题。我只需要调整我所在文件夹的权限。

    【讨论】:

    • 你需要做哪些调整?
    • @Miguel 我必须让自己成为该文件夹的所有者并给自己 777 权限。不是最干净的方法,但它有效。
    猜你喜欢
    • 1970-01-01
    • 2014-07-23
    • 2015-02-22
    • 2018-03-17
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多