2

我想解决这个问题中描述的相同问题

因此我想执行以下命令:

$ sudo setcap cap_net_bind_service=+ep /home/username/.linuxbrew/bin/node 

这产生了错误:

Failed to set capabilities on file `/home/username/.linuxbrew/bin/node' (Invalid argument)
The value of the capability argument is not permitted for a file. Or the file is not a regular (non-symlink) file

发生这种情况是因为文件夹名称是.linuxbrew吗?如果是,我该如何解决?

4

1 回答 1

3

发生这种情况是因为您试图在符号链接上运行它。尝试运行它:

sudo setcap cap_net_bind_service=+ep $(readlink -f ~username/.linuxbrew/node)
于 2015-10-13T22:50:29.560 回答