Fixing AppArmor Unprivileged User Namespace Restriction on Ubuntu 24.04

How to fix the 'User namespaces are not usable' error caused by AppArmor restrictions on Ubuntu 24.04
May 27, 2026

Fixing AppArmor Unprivileged User Namespace Restriction on Ubuntu 24.04

AppArmor는 리눅스 커널의 보안 모듈(LSM)로, 프로세스가 접근할 수 있는 리소스를 프로파일 기반으로 제한합니다.
Ubuntu 24.04 Noble Numbat부터 AppArmor가 unprivileged user namespace를 기본적으로 차단하도록 정책이 강화됐습니다.
Yocto/BitBake는 빌드 격리를 위해 내부적으로 pseudo(fakeroot 대체)와 user namespace를 사용합니다.
meta-security, meta-virtualization 같은 레이어를 추가하거나, 컨테이너 관련 레시피를 빌드할 때 특히 이 에러가 자주 발생합니다.
BitBake 실행 시 아래와 같은 에러가 발생합니다.
Error: User namespaces are not usable
Doc

ERROR: User namespaces are not usable by BitBake, possibly due to AppArmor. See https://discourse.ubuntu.com/t/ubuntu-24-04-lts-noble-numbat-release-notes/39890 for more information.

Apply Immediately (current session)

재부팅 시 초기화되지만, 즉시 적용이 필요한 경우 사용합니다.
Disable AppArmor user namespace restriction (temporary)
sh

Persist Across Reboots

재부팅 후에도 유지되도록 영구 설정합니다.
Persist the setting across reboots
sh
Jooojub
System S/W engineer
Explore Tags
Series
    Recent Post
    © 2026. jooojub. All right reserved.