简体   繁体   English

快速安装软件包后出现错误

[英]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: 我已经使用snap软件包管理器来安装软件包,即使使用简单的hello world示例,也总是遇到相同的错误:

$ 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 ? 使用sudo运行可以解决hello程序的问题,但是为什么我什至需要执行sudo呢?

BTW, for the other packages (Meshlab, CloudCompare) it doesn't work also with sudo and gives different errors. 顺便说一句,对于其他软件包(Meshlab,CloudCompare),它不适用于sudo并给出不同的错误。 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: 快照版本和Ubuntu发行版是:

$ snap version
snap    2.22.7
snapd   2.22.7
series  16
ubuntu  14.04
kernel  4.4.0-64-generic

Any chance your home directory is an nfs share with no-write-by-root enabled? 您的主目录是否有可能是启用了“不按根写入”功能的nfs共享? If so, try logging in as another user that has a local home. 如果是这样,请尝试以具有本地主目录的其他用户身份登录。

Also, see: https://bugs.launchpad.net/snappy/+bug/1625279 另请参阅: https : //bugs.launchpad.net/snappy/+bug/1625279

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM