1

I'm looking for the right method to install snapcraft on Ubuntu Core 18.
I've tried it with the command:

sudo snap install snapcraft 

but I get the error:

error: snap "snapcraft" requires classic confinement which is only available on classic systems

Without snapcraft I can't dig in the store looking for my private snaps!

  • 2
    No, it's not a duplicate of that. – popey Dec 2 '19 at 19:11
2

I'm still a bit of an Ubuntu-Core noob, so please forgive any errant assumptions expressed here, but I was able to get the snapcraft tutorial to work on an Ubuntu Core 18 system using the "classic" snap on an RBP 3B+ running ubuntu-core-18-armhf+raspi3.img.xz.

After the maiden Core boot on the pi and completing the network configuration: I logged in with my Ubuntu SSO and gave the fresh install a few minutes to update with the Ubuntu mother ship. After it rebooted, I logged back in and installed the classic snap from the edge channel:

sudo snap install --channel=edge classic --devmode

Then I ran the classic snap.

lh@localhost:~$ sudo classic
(classic)lh@localhost:~$

The first time I ran it a ton of stuff happened changing my env substantially. Afterwards I received a courtesy message saying:

This version of classic was build for Ubuntu Core 16. You appear to be using a different version of Ubuntu Core. You can install different versions of the classic environment, e.g. for Ubuntu Core 18:

I then exited classic and refreshed the snap from Core using the 18/edge channel. It's worth noting that installing the classic snap fresh from the 18/edge channel did not work for me. The reasons for that aren't so germane to this topic though.

(classic)lh@localhost:~$ exit
lh@localhost:~$ sudo snap refresh --channel=18/edge --devmode classic

Once refreshed I logged back into classic and was happy to find I could:

lh@localhost:~$ sudo classic
(classic)lh@localhost:~$ sudo apt update
(classic)lh@localhost:~$ sudo apt install snapcraft

After all the "apt-ing output", I could follow the snapcraft tutorial pretty much line for line. The only thing I did differently was after the snap built, I exited classic and installed the hello snap in my Core environment. It installed fine, but didn't run as my PATH wasn't set correctly. I found the binary in /snap/hello/current/bin, it ran fine using the FQPN. :)

| improve this answer | |
1

You cannot install the snap of snapcraft on Ubuntu Core because it's classic and classic (unconfined) snaps do not work on Core.

You could however snap login to login to the store as your account and then snap info mysnap to view details about your private snaps.

| improve this answer | |
  • But with snapcraft command i can see private snap and get info about them without know the name, only because i'm logged in the right account! Can use snap command to gather the same info ?? – cicciosgamino Dec 3 '19 at 9:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.