Hello, I am Yocto (kirkstone) and I added apache2 in the list of recipes I want to install: IMAGE_INSTALL:append = " apache2" The recipe works, but I get an error when do_rootfs is executed for my image. do_rootfs: Postinstall scriptlets of ['busybox'] have failed. If the intention is to defer them to first boot, then please place them into pkg_postinst_ontarget:${PN} (). Deferring to first boot via 'exit 1' is no longer supported. In the details error, I can see: update-alternatives: Error: not linking ....../rootfs/usr/sbin/httpd to /bin/busybox.nosuid since ...../rootfs/usr/sbin/httpd exists and is not a link. I think the error is coming from the fact that apache2 recipe is creating httpd under /usr/sbin/ when doing the install. When busybox recipe is executed by bitbake it tries to create the httpd link under the same location, but since the file is already there it fails. Best Regards, Flaviu
Have you enable httpd in busybox? If so don't do that or send a patch to add httpd alternative entries, please.
Right, you must have also turned on httpd in busybox. Your choices are to either also add the alternative when you do that for both apache and busybox, or don't turn on httpd in busybox. Personally I'd recommend not using the httpd in busybox.
Hello, thanks both of you for the quick answer and suggestions. "Have you enable httpd in busybox?" "Personally I'd recommend not using the httpd in busybox." The busybox is getting installed by some package manager, so the *.bb for busybox gets executed as it is. I even tried to remove it by using: IMAGE_INSTALL:remove = " busybox", but still gets baked (maybe there is a dependency somewhere). I would also prefer the solution to disable the http for busybox. Do you have a quick suggestion how to do this (I will create a *.bbapand)? Just as a clarification (and a correct starting point), setting the alternatives means using?: ALTERNATIVE_PRIORITY[] ALTERNATIVE_${PN}
httpd isn't enabled in the oe-core busybox by default, so this is something one of your layers is doing. Ideally, find the layer that is doing that and understand why. A bbappend can override this by adding a .cfg file to SRC_URI which just contains "# CONFIG_HTTPD is not set". If you look at meta/recipes-core/busybox/busybox/defconfig in your poky/oe-core tree, you'll see that's the default, which is why we said that this is something your environment is doing.
Thanks a lot for the hint. As suspected by you, indeed httpd for busybox was enabled in a different layer. I had another misleading problem (my problem) since I thought that: # CONFIG_HTTPD is not set means that this is a comment and will not be taken into consideration (my fault). Problem is now solved. Again, many thanks for your help!
You're not the first person to think that: # CONFIG_HTTPD is not set is a comment and not an explicit 'unset' instruction! Whoever made this design choice in the kernel (which has been copied into busybox and uboot) needs to fix it... Closing as this is now resolved.