Every flatpak app fails with this message:
$ flatpak run org.mozilla.firefox
bwrap: Unexpected capabilities but not setuid, old file caps config?
error: ldconfig failed, exit status 256
Ubuntu Mantic, flatpak installed with apt.
It must be something with bubblewrap or with the way it’s used, because:
$ bwrap
bwrap: Unexpected capabilities but not setuid, old file caps config?
$ sudo bwrap
usage: bwrap [OPTIONS...] [--] COMMAND [ARGS...]
--help Print this help
--version Print version
...
More info for commenters:
$ type -a bwrap
bwrap is /bin/bwrap
bwrap is /usr/bin/bwrap
bwrap is /bin/bwrap
$ ls -l /usr/bin/bwrap /bin/bwrap
.rwxr-xr-x 72k root 28 Feb 10:38 /usr/bin/bwrap
.rwxr-xr-x 72k root 28 Feb 10:38 /bin/bwrap
$ sudo flatpak repair
[21/23] Verifying flathub:app/com.google.Chrome/x86_64/stable…
Checking remotes...
Pruning objects
Erasing .removed
$ unshare --map-root-user
$ whoami
root
$ sysctl kernel.unprivileged_userns_clone
kernel.unprivileged_userns_clone = 1
I tried to set setuid for bwrap:
$ sudo chmod 4755 /usr/bin/bwrap
That makes flatpaks run, but with an ugly warning. I don’t think that’s a correct solution.
type -a bwrap
andls -l /usr/bin/bwrap /bin/bwrap
– Raffa Oct 18 '23 at 10:39sudo flatpak repair
and add it's output to your question as well. – Raffa Oct 18 '23 at 11:17sudo chmod -s /usr/bin/bwrap
… But you need the owner to be root, so change itsudo chown root:root /usr/bin/bwrap
– Raffa Oct 18 '23 at 12:52sudo chmod 0755 /usr/bin/bwrap
is another way of removing setuid bit as well if you prefer it. – Raffa Oct 18 '23 at 12:58sudo dpkg-reconfigure flatpak
and check ... If not fixed, trysudo apt install --reinstall flatpak
... If not, then be prepared to uninstall all flatpak apps withflatpak uninstall --all
then purge the package manager itself withsudo apt purge flatpak
... Then, install it againsudo apt install flatpak
... SAVE YOUR DATA FIRST that might be handled by or saved under currently installed flatpak applications BEFORE PURGING FLATPAK – Raffa Oct 18 '23 at 14:48sudo apt install --reinstall bubblewrap
– Raffa Oct 18 '23 at 14:52