![](/img/trans.png)
[英]autoconf unable to find pkg-config (PKG_PROG_PKG_CONFIG failing)
[英]configure: error: Need pkg-config to enable libusb support
我是 yocto 的新手,我的目標是將打印機驅動程序添加到 imx6 的 yocto 映像中,以便我們可以從板上訪問 priter。 我正在嘗試按照 IMXLXYOCTOUG.PDF 上的說明進行構建。
$ DISTRO=fsl-imx-xwayland MACHINE=imx6qsabresd source fsl-setup-release.sh -b build_dir
$ source setup-environment build_dir
$ bitbake fsl-image-qt5-validation-imx
基本構建成功了,我用 gui 調出了板子,一切都很好。 我想為圖像添加打印機支持,所以我添加了元打印( https://github.com/rossburton/meta-printing )層。 我已經更新了 bblayer.conf
BBFILES ?= ""
BBLAYERS = " \
${BSPDIR}/sources/poky/meta \
${BSPDIR}/sources/poky/meta-poky \
\
${BSPDIR}/sources/meta-openembedded/meta-oe \
${BSPDIR}/sources/meta-openembedded/meta-multimedia \
\
${BSPDIR}/sources/meta-freescale \
${BSPDIR}/sources/meta-freescale-3rdparty \
${BSPDIR}/sources/meta-freescale-distro \
**${BSPDIR}/sources/meta-printing \**
根據 github 中 README 中的說明。
稍后啟動后,我無法訪問 lp 命令來使用打印機打印一些示例文件。 所以我補充說
IMAGE_INSTALL_append = " cups"
在 local.conf 文件中,它在下面給了我這個錯誤..
| checking for posix_spawn... yes
| checking for tm_gmtoff member in tm structure... yes
| checking for st_gen member in stat structure... no
| checking for removefile... no
| configure: error: Need pkg-config to enable libusb support.
| NOTE: The following config.log files may provide further information.
| NOTE: /home/jifri/on_board/yocto/imx-yocto-bsp/build_dir/tmp/work/cortexa9hf-neon-poky-linux-gnueabi/cups/2.1.4-r0/cups-2.1.4/config.log
| ERROR: configure failed
| WARNING: exit code 1 from a shell command.
| ERROR: Function failed: do_configure (log file is located at /home/jifri/on_board/yocto/imx-yocto-bsp/build_dir/tmp/work/cortexa9hf-neon-poky-linux-gnueabi/cups/2.1.4-r0/temp/log.do_configure.8342)
ERROR: Task (/home/jifri/on_board/yocto/imx-yocto-bsp/sources/meta-printing/recipes-printing/cups/cups_2.1.4.bb:do_configure) failed with exit code '1'
NOTE: Tasks Summary: Attempted 5414 tasks of which 5399 didn't need to be rerun and 2 failed.
Summary: 2 tasks failed:
/home/jifri/on_board/yocto/imx-yocto-bsp/sources/meta-epson/recipes-epson/bbepson/bbepson_0.1.bb:do_compile
/home/jifri/on_board/yocto/imx-yocto-bsp/sources/meta-printing/recipes-printing/cups/cups_2.1.4.bb:do_configure
Summary: There were 4 ERROR messages shown, returning a non-zero exit code.
我在我的主機 PC 上安裝了 pkg-config
$ pkg-config --version
0.29.1
$ sudo apt-get install libusb-0.1-4
Reading package lists... Done
Building dependency tree
Reading state information... Done
libusb-0.1-4 is already the newest version (2:0.1.12-28).
The following packages were automatically installed and are no longer required:
snap-confine snapd-login-service
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 45 not upgraded.
$ sudo apt-get install libusb-1.0-0-dev
[sudo] password for eldaas:
Reading package lists... Done
Building dependency tree
Reading state information... Done
libusb-1.0-0-dev is already the newest version (2:1.0.20-1).
The following packages were automatically installed and are no longer required:
snap-confine snapd-login-service
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 45 not upgraded.
知道為什么配置:錯誤:需要 pkg-config 來啟用 libusb 支持。 正在發生。
或者它是正確的方法/有沒有更好的方法讓 lp 命令通過 yocto 在 imx6 上運行。 這樣我就可以訪問打印機了..
任何輸入都是apretiated ..謝謝。
我已經解決了同樣的問題。 實際上我已經添加了元打印層來訪問杯子。 但是杯子已經與 poky 中的元層一起存在(imx-yocto-bsp/sources/poky/meta/recipes-extended/cups)。 所以我刪除了元打印層,然后更新了 build/conf/local.conf
IMAGE_INSTALL_append = "杯子"
這對我有用,啟動后我可以在 imx6 板上使用 lp、lpadmin 等命令。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.