# Ubuntu, cannot set loopback interface flags

**URL:** <https://forum.systemcrafters.net/t/ubuntu-cannot-set-loopback-interface-flags/1748>\
**Category:** Guix\
**Tags:** guix\
**Created:** [August 5, 2025, 4:16am UTC](https://forum.systemcrafters.net/t/ubuntu-cannot-set-loopback-interface-flags/1748 "2025-08-05T04:16:00Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![wegei8](https://avatars.discourse-cdn.com/v4/letter/w/53a042/32.png) [@wegei8](https://forum.systemcrafters.net/u/wegei8)\
**Post date:** [August 5, 2025, 4:16am UTC](https://forum.systemcrafters.net/t/ubuntu-cannot-set-loopback-interface-flags/1748/1 "2025-08-05T04:16:00Z")

</div>

Hi, again. Fedora was working fine, but now I have to switch to Ubuntu.

OK, so I’m using Ubuntu 24.04 LTS. I installed the Guix package manager with the install script from the manual: [https://guix.gnu.org/install.sh](https://guix.gnu.org/install.sh)

I was able to do a `guix pull` to update my user’s packages. I also was able to run `sudo guix pull` to update the root user’s packages.

I was even able to do `guix shell htop` and that seemed to be working…

However, now I tried doing a `guix home reconfigure` and here’s where I’m running into trouble.

The command `guix home` fails. Then I checked the log and found this interesting bit.

```auto
$ zcat /var/log/...guix-1.4.0-41.826e305
+ guix build guile-bootstrap
accepted connection from pid 19192, user nixbld
substitute: guix substitute: warning: ACL for archive imports seems to be uninitialized, substitutes may be unavailable
substitute: guix substitute: warning: authentication and authorization of substitutes disabled!
The following derivation will be built:
  /tmp/guix-tests/store/vk5c5brcjy2nz0w72zd41zv31i3vsrkq-guile-bootstrap-2.0.drv
substitute: guix substitute: warning: authentication and authorization of substitutes disabled!
killing process 19223
guix build: error: while setting up the child process: in phase initLoopback: cannot set loopback interface flags: Operation not permitted
+ rm -r t-guix-graph-19031
FAIL tests/guix-graph.sh (exit status: 1)

SKIP: tests/guix-describe

```

My `home.scm` just has `(home-environment)`, empty.

My gut is telling me this has to do with AppArmor, but I’m not sure… but I remember where was some [extra config to do with Fedora](https://forum.systemcrafters.net/t/guix-on-fedora-selinux-remounting-writable-permission-denied/1746), so maybe?

---

<div class="post-metadata">

**Author:** ![wegei8](https://avatars.discourse-cdn.com/v4/letter/w/53a042/32.png) [@wegei8](https://forum.systemcrafters.net/u/wegei8)\
**Post date:** [August 5, 2025, 4:27am UTC](https://forum.systemcrafters.net/t/ubuntu-cannot-set-loopback-interface-flags/1748/2 "2025-08-05T04:27:14Z")

</div>

Ooooh, it is AppArmor.

```auto
[8181.700287] audit: type=1400 audit(1754363649.223:1257): apparmor="AUDIT" operation="userns_create" class="namespace" info="Userns create - transitioning profile" profile="unconfined" pid=93945 comm="guix-daemon" requested="userns_create" target="unprivileged_userns"
[8181.700960] audit: type=1400 audit(1754363649.224:1258): apparmor="DENIED" operation="capable" class="cap" profile="unprivileged_userns" pid=93966 comm="guix-daemon" capability=12 capname="net_admin"

```

---

<div class="post-metadata">

**Author:** ![wegei8](https://avatars.discourse-cdn.com/v4/letter/w/53a042/32.png) [@wegei8](https://forum.systemcrafters.net/u/wegei8)\
**Post date:** [August 5, 2025, 4:15pm UTC](https://forum.systemcrafters.net/t/ubuntu-cannot-set-loopback-interface-flags/1748/3 "2025-08-05T16:15:51Z")

</div>

Hm… disabling AppArmor allowed `guix home reconfigure` to work.

> <https://askubuntu.com/questions/1536716/why-cant-i-disable-apparmor-on-24-04-1>

I’m on Ubuntu 24.04.2 LTS, I had to run these commands.

```auto
sudo systemctl stop apparmor
sudo systemctl disable apparmor

```

Then I had to edit `/etc/default/grub` to add `apparmor=0` to my kernel parameters.

```auto
GRUB_CMDLINE_LINUX_DEFAULT="apparmor=0"
GRUB_CMDLINE_LINUX="apparmor=0"

```

Then I ran these commands.

```auto
sudo update-grub
sudo reboot

```

Although, this is a very heavy-handed solution… I guess I need to write some sort of AppArmor profile for `guix` and/or `guix-daemon`, so I don’t have to disable AppArmor system-wide?

---

<div class="post-metadata">

**Author:** ![wegei8](https://avatars.discourse-cdn.com/v4/letter/w/53a042/32.png) [@wegei8](https://forum.systemcrafters.net/u/wegei8)\
**Post date:** [August 9, 2025, 3:30pm UTC](https://forum.systemcrafters.net/t/ubuntu-cannot-set-loopback-interface-flags/1748/4 "2025-08-09T15:30:54Z")

</div>

Found another link that may be relevant.

> **[Bug #2064115 “Conflict between apparmor and guix on Ubuntu 24.04...” : Bugs :...](https://bugs.launchpad.net/ubuntu/+source/guix/+bug/2064115)**
>
> On Ubuntu 24.04 i'm unable to use GNU guix as installed from the apt repository.
> 
> Version:
> Package: guix
> Architecture: amd64
> Version: 1.4.0-6build1
> 
> To reproduce:
> \- Install a fresh 23.10 host
> \- Upgrade to 24.04 with do-release-upgrade -d (but i’ve...

I guess it’s just a matter of writing the correct AppArmor profile. Maybe something like this?

```auto
# File: /etc/apparmor.d/guix
abi <abi/3.0>,

include <tunables/global>

profile guix /gnu/store/{*-guix-command,*/bin/guix,*/libexec/guix/guile,*/bin/guile} flags=(attach_disconnected) {
  # Allow all rules
  capability,
  network,
  mount,
  remount,
  umount,
  pivot_root,
  ptrace,
  signal,
  dbus,
  unix,
  file,
}

```
