我正在尝试在Yocto上构建自定义镜像。当我创建一个镜像时,在glibc-locale(do_package步骤)中出现错误。
错误信息为:
ERROR: glibc-locale-2.24-r0 do_package: QA Issue: glibc-locale: Files/directories were installed but not shipped in any package:
{
"a lot of file in /usr/lib/gconv, /usr/share/i18n paths"
}
Please set FILES such that these items are packaged. Alternatively if they are unneeded, avoid installing them or delete them within do_install.
glibc-locale: 820 installed and not shipped files. [installed-vs-shipped]
ERROR: glibc-locale-2.24-r0 do_package: Fatal QA errors found, failing task.
ERROR: glibc-locale-2.24-r0 do_package: Function failed: do_package
ERROR: Logfile of failure stored in: /home/test/rpi/build/tmp/work/cortexa7hf-neon-vfpv4-poky-linux-gnueabi/glibc-locale/2.24-r0/temp/log.do_package.30243
ERROR: Task (/home/test/poky-morty/meta/recipes-core/glibc/glibc-locale_2.24.bb:do_package) failed with exit code '1'
我尝试在glibc-locale_2.24.bb文件中添加以下内容来解决它:
INSANE_SKIP_${PN} = "installed-vs-shipped "
这样做后,在glibc do_package步骤中就没有错误了,但在do_rootfs步骤中出现了错误:
ERROR: ekt-image-1.0-r0 do_rootfs: Unable to install packages. Command '/home/test/rpi/build/tmp/sysroots/x86_64-linux/usr/bin/opkg --volatile-cache -f /home/test/rpi/build/tmp/work/raspberrypi3-poky-linux-gnueabi/ekt-image/1.0-r0/opkg.conf -t /home/test/rpi/build/tmp/work/raspberrypi3-poky-linux-gnueabi/ekt-image/1.0-r0/temp/ipktemp/ -o /home/test/rpi/build/tmp/work/raspberrypi3-poky-linux-gnueabi/ekt-image/1.0-r0/rootfs --force_postinstall --prefer-arch-to-version install locale-base-en-us' returned 255:
Collected errors:
* opkg_prepare_url_for_install: Couldn't find anything to satisfy 'locale-base-en-us'.
ERROR: ekt-image-1.0-r0 do_rootfs: Function failed: do_rootfs
ERROR: Logfile of failure stored in: /home/test/rpi/build/tmp/work/raspberrypi3-poky-linux-gnueabi/ekt-image/1.0-r0/temp/log.do_rootfs.10085
ERROR: Task (/home/test/rpi/meta-rpi/images/ekt-image.bb:do_rootfs) failed with exit code '1'
我尝试清除 glibc 和 glibc-locale,但是没有成功。
编辑:我尝试在我的 glibc-locale.inc 文件中添加以下这些行:
FILES_kernel-base += "/usr/share/i18n/charmaps/*"
FILES_kernel-base += "/usr/share/i18n/locales/*"
FILES_kernel-base += "/usr/lib/gconv/*"
FILES_kernel-base += "/usr/share/i18n*"
同时这些行:
FILES_${PN} += "/usr/share/i18n/charmaps/*"
FILES_${PN} += "/usr/share/i18n/locales/*"
FILES_${PN} += "/usr/lib/gconv/*"
FILES_${PN} += "/usr/share/i18n*"
但这并没有解决我的问题。