2015-09-25 45 views
0

我想解决在this issue中描述的相同问题。Linuxbrew Nodejs - 绑定到端口80

所以我想执行以下命令:

$ 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,如果是我怎么修复它?

+1

你检查,如果它的符号链接? – bluesman

回答

1

它发生是因为你试图在符号链接上运行它。尝试运行此代替:

sudo setcap cap_net_bind_service=+ep $(readlink -f ~username/.linuxbrew/node) 
+0

是的你是对的。我太愚蠢了,不知道/home/username/.linuxbrew/bin/node是一个符号链接。谢谢您的帮助。 – Haves