Snapcraft does not work at all (Ubuntu 24.10)

As title. What am I doing?

Just trying to create my first hello world snap.

I created a first hello world with snapcraft init

then I tried to build it with the snapcraft command.

It returns this error: LXD requires additional permissions.
Recommended resolution: Ensure that the user is in the ‘lxd’ group. Visit https://documentation.ubuntu.com/lxd/en/latest/getting_started/ for instructions on installing and configuring LXD for your operating system.

I tried adding my user to LXD but it doesn’t work. still have this error.

If I launch the snapcraft command with the sudo I have this error: Timed out waiting for networking to be ready.
Full execution log: ‘/root/.local/state/snapcraft/log/snapcraft-20241127-115615.011560.log’

any idea on what is happening here?

Did you log out and back in again after adding your user to that group? If you don’t, the change won’t be active…

1 Like

I logged out and it didn’t worked, I rebooted and it worked. weird, but thanks :slight_smile:

trying to create an hello world:

  • snapcraft init
  • snapcraft

returns this error: Timed out waiting for networking to be ready.

any idea?

Do you have docker installed?

yess but I don’t want to de-install it just for snapcraft. :slight_smile: I noticed that disabling ufw (ubuntu firewall) made the trick.

but what should I allow to permit to snapcraft to work with the firewall running using ubuntu 24.10 and ufw?

Hmmm… @zyga @sergiusens Can you please help him?

1 Like

I think there are workarounds in the well known docker issue (that apparently won’t get fixed is to be fixed soon ! (after only 7 years :slight_smile: ))

1 Like

For people using Ubuntu this solved for me:

sudo ufw allow in on lxdbr0
sudo ufw route allow in on lxdbr0
sudo ufw route allow out on lxdbr0
1 Like