Launchpad builds for amd64 & i386 fail: snapd snap install errors with "cannot set capabilities: Operation not permitted"

Since some days ago, the nextcloud snap, based on core18, is failing to build for amd64 & i386 on launchapd.

This is what the log shows:

Running '['linux64', 'snap', 'install', '--channel=latest/stable', 'snapd']'. Attempt 1
cannot set capabilities: Operation not permitted
Running '['linux64', 'snap', 'install', '--channel=latest/stable', 'snapd']'. Attempt 2
cannot set capabilities: Operation not permitted
Running '['linux64', 'snap', 'install', '--channel=latest/stable', 'snapd']'. Attempt 3
cannot set capabilities: Operation not permitted
Install failed

We have configured the following source snap channels for automatic builds:

snapcraft	7.x/stable
snapd		latest/stable

This looks similar to what @jgneff observed here.

Thanks for any help!

OK, now I’ve also seen the following error before the snapd snap install :

Setting up apparmor (2.12-4ubuntu5.3) ...
Created symlink /etc/systemd/system/sysinit.target.wants/apparmor.service → /lib/systemd/system/apparmor.service.
find: ‘’: No such file or directory
Warning from stdin (line 1): /sbin/apparmor_parser: cannot use or update cache, disable, or force-complain via stdin
Warning failed to create cache: (null)

And this is now happening for multiple archs:

  1. arm64
  2. armhf

Any hints @verterok ?

Yes, now I’m getting the same error for all three architectures below:

  1. amd64
  2. arm64
  3. armhf

Yet the builds are working for ppc64el and s390x using the same snapcraft.yaml file. You can see all five builds on the BootJDK Launchpad page.

I’m just getting the messages below when the builds fail:

Processing triggers for libc-bin (2.31-0ubuntu9.18) ...
cannot set capabilities: Operation not permitted
Install failed

I would open a bug on Launchpad, but I’m not sure whether it should be opened with snapcraft, snapd, core20, or Launchpad itself.

Who can help us here @ogra ?

I helped the Launchpad team debug the problem ~2 days ago. The root cause was a misuse of unconfined privileged lxd containers, which affected the host VM. The came up with a workaround but I do not know whether it was deployed. I’ll try to check in with the team and maybe get someone to post more info here.

1 Like

I was told that the workaround is in the process of being reviewed and applied.

1 Like

All of my builds are working again as of today. Thank you @mborzecki1 for your help in debugging the problem and for letting us know the progress of its fix!

1 Like