CUPS web interface on YOCTO

笑着哭i 提交于 2020-01-07 05:08:06

问题


I have a yocto image into which I have included the CUPS package (using IMAGE_INSTALL_append).

While running the OS, I couldn't find the cups file in /etc/init.d.

I started cups using cupsd. When I tried accessing the web interface using localhost:631, I got a not found error. The console shows that it is not able to load resources on any of those URLS:

http://localhost:631/cups.css

http://localhost:631/

http://localhost:631/favicon.ico

The html and related files seem to be listed in the cups.inc file. Are there additional configuration changes that need be made before doing the YOCTO build or on the CUPS setup?

Since I am very new to yocto and developing in a linux environment, I am not sure if I am missing something obvious.


回答1:


You made good research pointing to the recipe and were actually close to find the solution.

In the recipe, you can read:

# Remove sysinit script and symlinks if sysvinit is not in DISTRO_FEATURES
if ${@bb.utils.contains('DISTRO_FEATURES','sysvinit','false','true',d)}; then
    rm -rf ${D}${sysconfdir}/init.d/
    rm -rf ${D}${sysconfdir}/rc*
fi

Is sysvinit in your DISTRO_FEATURES?

If you don't know you can do

bitbake cups -e | grep "^DISTRO_FEATURES="



回答2:


This question is quite old and already has an accepted answer. Nevertheless, it may be of use for someone else facing the same problem of missing static html content of the CUPS Web interface.

The CUPS recipe packages the static web content into cups-doc. Thus, instead of

IMAGE_INSTALL_append = " cups"

it should be

IMAGE_INSTALL_append = " cups cups-doc"

in your conf/local.conf. Then, also the files under /usr/share/doc/cups were added to the rootfs.

Check

# Replace <target>, <image> and <version> to match your configuration
# e.g.: raspberrypi3-poky-linux-gnueabi/core-image-full-cmdline/1.0-r0

$YOUR_POKY_DIRECTORY/build/tmp/work/<target>/<image>/<version>/rootfs/usr/share/doc/cups

that was entirely missing before adding the cups-doc package.



来源:https://stackoverflow.com/questions/45220470/cups-web-interface-on-yocto

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!