首页 > 解决方案 > 无法安装 Chromium depot_tools

问题描述

我正在尝试在 Raspberry Pi 中安装 Chromium depot 工具,但我fetch什么也做不了。从我做的教程中:

git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git

export PATH=/path/to/depot_tools:$PATH

然后我尝试执行一个简单的帮助命令:fetch --helpcommand。它给出了错误:

pi@raspberrypi:~/experiments/build-webrtc/depot_tools $ fetch --help
Errors:
  failed to resolve infra/3pp/tools/git/linux-armv6l@version:2.24.1.chromium.5 (line 27): no such package
  failed to resolve infra/3pp/tools/cpython/linux-armv6l@version:2.7.17.chromium.22 (line 21): no such package
  failed to resolve infra/3pp/tools/cpython3/linux-armv6l@version:3.8.0.chromium.8 (line 24): no such package
/home/pi/experiments/build-webrtc/depot_tools/bootstrap_python3: line 32: bootstrap-3.8.0.chromium.8_bin/python3/bin/python3: No such file or directory
cat: /home/pi/experiments/build-webrtc/depot_tools/python3_bin_reldir.txt: No such file or directory
[E2020-05-01T13:00:13.414783+01:00 20120 0 annotate.go:241] original error: fork/exec /home/pi/experiments/build-webrtc/depot_tools/python3: no such file or directory
[E2020-05-01T13:00:13.414904+01:00 20120 0 annotate.go:241] 
[E2020-05-01T13:00:13.414950+01:00 20120 0 annotate.go:241] goroutine 1:
[E2020-05-01T13:00:13.415009+01:00 20120 0 annotate.go:241] #0 go.chromium.org/luci/vpython/python/interpreter.go:89 - python.(*Interpreter).GetVersion()
[E2020-05-01T13:00:13.415049+01:00 20120 0 annotate.go:241] #1 go.chromium.org/luci/vpython/venv/config.go:286 - venv.(*Config).resolvePythonInterpreter()
[E2020-05-01T13:00:13.415088+01:00 20120 0 annotate.go:241]   reason: failed to determine Python version for: /home/pi/experiments/build-webrtc/depot_tools//python3
[E2020-05-01T13:00:13.415127+01:00 20120 0 annotate.go:241] 
[E2020-05-01T13:00:13.415163+01:00 20120 0 annotate.go:241] #2 go.chromium.org/luci/vpython/venv/config.go:186 - venv.(*Config).makeEnv()
[E2020-05-01T13:00:13.415214+01:00 20120 0 annotate.go:241]   reason: failed to resolve system Python interpreter
[E2020-05-01T13:00:13.415254+01:00 20120 0 annotate.go:241] 
[E2020-05-01T13:00:13.415290+01:00 20120 0 annotate.go:241] #3 go.chromium.org/luci/vpython/venv/venv.go:150 - venv.With()
[E2020-05-01T13:00:13.415326+01:00 20120 0 annotate.go:241]   reason: failed to initialize empty probe environment
[E2020-05-01T13:00:13.415363+01:00 20120 0 annotate.go:241] 
[E2020-05-01T13:00:13.415413+01:00 20120 0 annotate.go:241] #4 go.chromium.org/luci/vpython/run.go:62 - vpython.Run()
[E2020-05-01T13:00:13.415451+01:00 20120 0 annotate.go:241] #5 go.chromium.org/luci/vpython/application/application.go:320 - application.(*application).mainImpl()
[E2020-05-01T13:00:13.415488+01:00 20120 0 annotate.go:241] #6 go.chromium.org/luci/vpython/application/application.go:406 - application.(*Config).Main.func1()
[E2020-05-01T13:00:13.415526+01:00 20120 0 annotate.go:241] #7 go.chromium.org/luci/vpython/application/support.go:46 - application.run()
[E2020-05-01T13:00:13.415563+01:00 20120 0 annotate.go:241] #8 go.chromium.org/luci/vpython/application/application.go:405 - application.(*Config).Main()
[E2020-05-01T13:00:13.415601+01:00 20120 0 annotate.go:241] #9 vpython/main.go:106 - main.mainImpl()
[E2020-05-01T13:00:13.415638+01:00 20120 0 annotate.go:241] #10 vpython/main.go:112 - main.main()
[E2020-05-01T13:00:13.415674+01:00 20120 0 annotate.go:241] #11 runtime/proc.go:203 - runtime.main()
[E2020-05-01T13:00:13.415710+01:00 20120 0 annotate.go:241] #12 runtime/asm_arm.s:868 - runtime.goexit()

标签: google-chrome-devtoolschromium

解决方案


我遇到了完全相同的问题,即

  • python3_bin_reldir.txt- 没有这样的文件或目录
  • failed to determine Python version
  • ...

在 Windows 上,事实证明环境变量DEPOT_TOOLS_UPDATE=0是罪魁祸首。一旦我删除它,一切都很顺利。似乎它阻止了 depot_tools 工具在 Windows 上正确引导。

请尝试取消设置此环境变量,看看它是否适合您。


推荐阅读