I've used the snap package manager to install packages and I'm always getting the same error, even with the simple hello world example:
$ sudo snap install hello
$ hello
cannot create user data directory: /home/aaa/snap/hello/20: Bad file descriptor
Running with sudo
solves the problem for the hello
program, but why do I even need to do sudo
?
BTW, for the other packages (Meshlab, CloudCompare) it doesn't work also with sudo
and gives different errors. For example:
~$ sudo cloudcompare.ccViewer
mkdir: cannot create directory '/run/user/0': Permission denied
No protocol specified
QXcbConnection: Could not connect to display :0
The snap version and Ubuntu distro are:
$ snap version
snap 2.22.7
snapd 2.22.7
series 16
ubuntu 14.04
kernel 4.4.0-64-generic