Ubuntu – Snap – ‘sudo classic’ error


I'm following the snap tutorial here:

The snap installed ok …

user001@laptop:~$ sudo snap install classic --edge --devmode
classic (edge) 16.04 from 'canonical' installed

I am running into a problem right at the start. When I try to enter the classic snap …

user001@laptop:~$ sudo classic
[sudo] password for user001: 
mount: devpts is already mounted or /dev/pts busy
       devpts is already mounted on /dev/pts
sudo: unknown user: user001
sudo: unable to initialize policy plugin

I can't find anything about this. Any advice on what to troubleshoot?

Best Answer

  • There's a big header at the top of that section titled "If you are running ubuntu core." Judging from your prompt (user0001@laptop) I'm guessing that's actually not the case for you.

    The classic snap is only to obtain a "classic" developer environment on Ubuntu Core, which is completely snap-based (e.g. no apt, no debs, etc.). In your case, I'm guessing you're already running on a "classic" (i.e. not snap-based) distribution, in which case you don't need the classic snap, and can simply move on to the next step.

    In fact, the beginning of that section says pretty much just that:

    Ubuntu Core is not a traditional Linux distribution: there is no "apt", the system is read-only. How can you develop and build snap in such an environment then? We have a special snap for this!

    Enter the "classic" snap. This snap will get us into a chroot, where we have a traditional Ubuntu distribution. We can there install more packages, change files projects and run snapcraft to build our snap. The home directory is shared between the container and ubuntu core. We can thus build a snap, then, outside of the classic snap, install and test it.

  • Related Question