Yocto builds auf Ubuntu 24.04

On my work Linux machine, I’m using Ubuntu 24.04. Recently, when I tried to build a Yocto-based project, the build failed due to the AppArmor configuration. I found a solution in an Ubuntu Discourse post: the AppArmor configuration needed to be adjusted to allow Bitbake to create user namespaces.

First, create a config file: sudo vi /etc/apparmor.d/bitbake:

abi <abi/4.0>,

include <tunables/global>

/home/**/bitbake/bin/bitbake flags=(unconfined) {  
        userns,  
}

Then load the configuration: sudo apparmor_parser -r /etc/apparmor.d/bitbake

Related Content