Error After Installing Packages with Snap

Error After Installing Packages with Snap

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
4

1 Answer

Any chance your home directory is an nfs share with no-write-by-root enabled? If so, try logging in as another user that has a local home.

Also, see:

1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Sarah Jenkins
Author

Sarah Jenkins

Sarah Jenkins is a veteran tech journalist with over 12 years of experience covering artificial intelligence, mobile innovations, and digital ethics. Her insights have appeared in leading technology publications worldwide.