乐鑫技术交流
直播中

名士流

8年用户 895经验值
私信 关注
[问答]

MacOS按照文档的步骤进行环境的配置, esp-matter执行./install.sh的时候报错怎么解决?

MacOS 按照文档的步骤进行环境的配置, esp-matter执行./install.sh的时候报错:
Downloading and installing packages into local source directory:

  Setting up CIPD package manager...done (11.5s)
  Setting up Project actions........skipped (0.1s)
  Setting up Python environment.....[|]
ERROR at /Users/wangxiufeng/desktop/matter/esp-matter/connectedhomeip/connectedhomeip/third_party/pigweed/repo/pw_build/facade.gni:187:7: Assertion failed.
      assert(_dep_is_in_link_dependencies,
      ^-----
/Users/wangxiufeng/desktop/matter/esp-matter/connectedhomeip/connectedhomeip/third_party/pigweed/repo/pw_log:impl must be listed in the pw_build_LINK_DEPS build arg when the /Users/wangxiufeng/desktop/matter/esp-matter/connectedhomeip/connectedhomeip/third_party/pigweed/repo/pw_log:pw_log facade is in use. Please update your toolchain configuration.
See /Users/wangxiufeng/desktop/matter/esp-matter/connectedhomeip/connectedhomeip/third_party/pigweed/repo/pw_log/BUILD.gn:47:1: whence it was called.
pw_facade("pw_log") {
^--------------------
See //src/lib/support/BUILD.gn:351:5: which caused the file to be included.
    "$dir_pw_log:impl",
    ^-----------------
['gn', 'gen', '/Users/wangxiufeng/desktop/matter/esp-matter/connectedhomeip/connectedhomeip/.environment/gn_out', '--args=chip_crypto="boringssl" dir_pigweed="/Users/wangxiufeng/desktop/matter/esp-matter/connectedhomeip/connectedhomeip/third_party/pigweed/repo"']

Traceback (most recent call last):
  File "/Users/wangxiufeng/desktop/matter/esp-matter/connectedhomeip/connectedhomeip/third_party/pigweed/repo/pw_env_setup/py/pw_env_setup/virtualenv_setup/install.py", line 402, in install_packages
    subprocess.check_call(
  File "/usr/local/Cellar/python@3.12/3.12.3/Frameworks/Python.framework/Versions/3.12/lib/python3.12/subprocess.py", line 413, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['gn', 'gen', '/Users/wangxiufeng/desktop/matter/esp-matter/connectedhomeip/connectedhomeip/.environment/gn_out', '--args=chip_crypto="boringssl" dir_pigweed="/Users/wangxiufeng/desktop/matter/esp-matter/connectedhomeip/connectedhomeip/third_party/pigweed/repo"']' returned non-zero exit status 1.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/wangxiufeng/desktop/matter/esp-matter/connectedhomeip/connectedhomeip/third_party/pigweed/repo/pw_env_setup/py/pw_env_setup/env_setup.py", line 995, in
    sys.exit(main())
             ^^^^^^
  File "/Users/wangxiufeng/desktop/matter/esp-matter/connectedhomeip/connectedhomeip/third_party/pigweed/repo/pw_env_setup/py/pw_env_setup/env_setup.py", line 987, in main
    return EnvSetup(**vars(parse())).setup()
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/wangxiufeng/desktop/matter/esp-matter/connectedhomeip/connectedhomeip/third_party/pigweed/repo/pw_env_setup/py/pw_env_setup/env_setup.py", line 577, in setup
    result = step(spin)
             ^^^^^^^^^^
  File "/Users/wangxiufeng/desktop/matter/esp-matter/connectedhomeip/connectedhomeip/third_party/pigweed/repo/pw_env_setup/py/pw_env_setup/env_setup.py", line 766, in virtualenv
    if not virtualenv_setup.install(
           ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/wangxiufeng/desktop/matter/esp-matter/connectedhomeip/connectedhomeip/third_party/pigweed/repo/pw_env_setup/py/pw_env_setup/virtualenv_setup/install.py", line 443, in install
    install_packages(gn_target)
  File "/Users/wangxiufeng/desktop/matter/esp-matter/connectedhomeip/connectedhomeip/third_party/pigweed/repo/pw_env_setup/py/pw_env_setup/virtualenv_setup/install.py", line 410, in install_packages
    raise subprocess.CalledProcessError(
subprocess.CalledProcessError: Command '['gn', 'gen', '/Users/wangxiufeng/desktop/matter/esp-matter/connectedhomeip/connectedhomeip/.environment/gn_out', '--args=chip_crypto="boringssl" dir_pigweed="/Users/wangxiufeng/desktop/matter/esp-matter/connectedhomeip/connectedhomeip/third_party/pigweed/repo"']' returned non-zero exit status 1.

请问是什么原因导致的,谢谢大佬
                                                                                                                                                

回帖(1)

贾大林

2024-7-19 17:32:11
从您提供的错误信息来看,这个问题可能是由于在执行`./install.sh`脚本时,某些依赖包没有正确安装或者配置导致的。为了解决这个问题,您可以尝试以下步骤:

1. **确保网络连接正常**:下载依赖包需要稳定的网络连接。请检查您的网络连接是否正常。

2. **清理之前的安装**:有时候,之前的安装可能会影响新的安装。您可以尝试删除`esp-matter`目录,然后重新克隆仓库:
   ```
   rm -rf esp-matter
   git clone https://github.com/espressif/esp-matter.git
   ```

3. **检查磁盘空间**:确保您的MacOS系统有足够的磁盘空间来安装所需的依赖包。

4. **手动安装依赖包**:如果自动安装脚本出现问题,您可以尝试手动安装所需的依赖包。根据错误信息,可能需要安装的依赖包包括:
   - Python
   - Ninja
   - CIPD

   您可以使用以下命令安装这些依赖包:
   ```bash
   # 安装 Python
   brew install python

   # 安装 Ninja
   brew install ninja

   # 安装 CIPD
   git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
   export PATH="$PATH:/path/to/depot_tools"
   ```

5. **检查权限**:确保您有足够的权限来执行`./install.sh`脚本。如果没有,您可以尝试使用`sudo`命令:
   ```
   sudo ./install.sh
   ```

6. **查看详细错误信息**:如果问题仍然存在,您可以尝试查看更详细的错误信息。在执行脚本时,添加`-x`选项可以显示详细的执行过程:
   ```
   ./install.sh -x
   ```


举报

更多回帖

发帖
×
20
完善资料,
赚取积分