You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

如何修复Chromium构建时的gclient venv构建错误?

Windows平台Chromium构建gclient报错解决方案

错误原因分析

报错核心是exec: "cipd": cannot run executable found relative to current directory,说明gclient无法找到depot_tools自带的cipd工具。这和你手动用pip安装virtualenv无关——Chromium构建系统依赖自身通过cipd管理的virtualenv版本,手动安装的版本无法替代,depot_tools路径未正确配置才是根本问题。

解决步骤

  • 确保depot_tools路径在系统PATH最优先级

    1. 打开「系统属性」→「高级」→「环境变量」
    2. 在系统变量的Path列表中,将depot_tools的安装路径(例如C:\depot_tools)移到最顶部
    3. 关闭所有已打开的终端窗口,重新启动一个新终端(必须重启,否则环境变量不会生效)
  • 重置depot_tools到最新状态
    在新终端中进入depot_tools目录,执行以下命令修复可能损坏的组件:

    git clean -fd
    git pull
    
  • 重新执行gclient同步
    回到Chromium源码工作目录,运行:

    gclient sync
    
  • 移除手动安装的virtualenv避免冲突
    由于构建系统会自行管理依赖,手动安装的virtualenv可能导致版本冲突,执行以下命令卸载:

    pip uninstall -y virtualenv
    

内容的提问来源于stack exchange,提问作者Christoffer Smith

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.09 13:03:21