pip - Yocto core-base-image 上的枕头安装错误
问题描述
我正在尝试在 Yocto core-base-image 中安装 Pillow,但是当我使用 pip3 install Pillow 时,我收到以下错误消息:
Running setup.py install for Pillow ... error
Complete output from command /usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/var/volatile/tmp/pip-install-n_gnb4rr/Pillow/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /var/volatile/tmp/pip-record-1mienill/install-record.txt --single-version-externally-managed --compile:
.
.
.
File "/var/volatile/tmp/pip-install-n_gnb4rr/Pillow/setup.py", line 687, in build_extensions
raise RequiredDependencyException(f)
__main__.RequiredDependencyException: jpeg
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/var/volatile/tmp/pip-install-n_gnb4rr/Pillow/setup.py", line 903, in <module>
raise RequiredDependencyException(msg)
__main__.RequiredDependencyException:
The headers or library files could not be found for jpeg,
a required dependency when compiling Pillow from source.
Please see the install instructions at:
https://pillow.readthedocs.io/en/latest/installation.html
----------------------------------------
Command "/usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/var/volatile/tmp/pip-install-n_gnb4rr/Pillow/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /var/volatile/tmp/pip-record-1mienill/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /var/volatile/tmp/pip-install-n_gnb4rr/Pillow/
我在 loca.conf 文件中包含 jpeg 和 libjpeg-turbo,如下所示:
CONF_VERSION = "1"
MACHINE ?= "raspberrypi2"
INHERIT += "rm_work"
DL_DIR ?= "/home/<user>/poky-warrior-21.0.1/downloads"
CORE_IMAGE_EXTRA_INSTALL += " python3 python3-pip python3-dev git libjpeg-turbo jpeg libpng"
IMAGE_INSTALL_append = " opencv"
IMAGE_INSTALL_append = " cmake"
IMAGE_INSTALL_append = " nano"
IMAGE_INSTALL_append = " packagegroup-core-buildessential"
但它不起作用,这是我的 bblayers.conf 文件:
# POKY_BBLAYERS_CONF_VERSION is increased each time build/conf/bblayers.conf
# changes incompatibly
POKY_BBLAYERS_CONF_VERSION = "2"
BBPATH = "${TOPDIR}"
BBFILES ?= ""
BBLAYERS ?= " \
/home/adrian/poky-warrior-21.0.1/meta \
/home/adrian/poky-warrior-21.0.1/meta-poky \
/home/adrian/poky-warrior-21.0.1/meta-yocto-bsp \
/home/adrian/poky-warrior-21.0.1/meta-raspberrypi \
/home/adrian/poky-warrior-21.0.1/meta-opencv \
/home/adrian/poky-warrior-21.0.1/meta-cmake \
/home/adrian/poky-warrior-21.0.1/meta-nano \
"
解决方案
推荐阅读
- angular - 从 laravel 中的相关表中获取具有列别名的数据
- java - 十六进制编码器方法产生奇怪的字符串而不是 SHA-256 字符串
- android - 无法为 Android 模拟器选择系统映像
- python - 无法从 plt.bar 生成条形图
- python - 尝试从网站获取文件,但延迟正在毁掉一切
- php - Htaccess 重定向到 index.php?
- karate - 空手道 - 将 Json 部分与父项匹配
- amazon-ec2 - Ansible:如何循环 IP 地址直到第一次成功的 shell 输出?
- javascript - 用柏树检查变换
- node.js - 基于相关模型计数的环回查询文档