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

Yocto嵌入式系统中arm-poky-linux-gnueabi-gcc缺失致依赖安装报错求助

Fixing "arm-poky-linux-gnueabi-gcc: No such file or directory" When Installing Google Assistant SDK in Yocto

Alright, let's break down what's going on here. That error about missing arm-poky-linux-gnueabi-gcc tells us your Python environment isn't hooked up to Yocto's cross-compilation tools properly—critical for installing packages like the Google Assistant SDK that have C extensions. Here's how to fix it step by step:

1. Load Yocto's Cross-Compilation Environment First

Chances are you skipped loading the core Yocto SDK environment script before activating your Python virtual env. The env/bin/activate only sets up Python-specific variables, but you need Yocto's script to configure paths to the ARM compiler and other embedded tools.

Run this before activating your Python virtual environment:

source /path/to/your/yocto-sdk/environment-setup-arm-poky-linux-gnueabi

Replace /path/to/your/yocto-sdk with the actual directory where your Yocto SDK is installed. This script will set PATH, CC, CXX, and other critical environment variables so your system can find arm-poky-linux-gnueabi-gcc.

2. Verify the Compiler is in Your PATH

After loading the SDK script, double-check that the compiler is accessible:

which arm-poky-linux-gnueabi-gcc

If this returns a valid path, great—move on to activating your Python virtual env and re-running the pip install. If not, you might have a broken SDK installation, or the path wasn't set correctly. Re-run the SDK environment script and check again.

3. Force Pip to Use the Cross-Compiler (If Needed)

Even with the environment set up, sometimes pip doesn't pick up the cross-compiler automatically. In that case, explicitly set the CC variable before running pip, or pass build options directly:

Option A: Set the compiler environment variable first

export CC=arm-poky-linux-gnueabi-gcc
source env/bin/activate
python -m pip install --upgrade google-assistant-sdk[samples]

Option B: Pass build flags directly to pip

source env/bin/activate
python -m pip install --upgrade google-assistant-sdk[samples] \
    --global-option=build_ext \
    --global-option="-I$SDKTARGETSYSROOT/usr/include" \
    --global-option="-L$SDKTARGETSYSROOT/usr/lib" \
    --global-option="-CC=arm-poky-linux-gnueabi-gcc"

The SDKTARGETSYSROOT variable is set by Yocto's environment script, so it should point to the correct sysroot for your target device.

4. Ensure Your Yocto SDK Has Required Development Libraries

The Google Assistant SDK relies on libraries like libffi and Python development headers. If your SDK doesn't include these, you'll run into compiler errors even after fixing the path issue.

To add these to your SDK:

  1. Open your Yocto build's local.conf file
  2. Add this line:
    TOOLCHAIN_TARGET_TASK += "libffi-dev python3-dev"
    
  3. Rebuild the SDK with:
    bitbake meta-toolchain
    

Then re-install the SDK on your host machine and repeat the earlier steps.


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

相关产品推荐
方舟 Agent Plan

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

最近更新时间:2026.05.26 09:42:56