【发布时间】:2016-10-06 12:56:17
【问题描述】:
以 root 身份运行 git hub 需要什么?
git hub 在非 root 用户中完美运行。
要以 root 身份安装它,我运行了 brew install hub 导致
# brew install hub
W: be careful as root.
========================================================================
You may want to update following environments after installed linuxbrew.
PATH, MANPATH, INFOPATH
(example: /usr/share/doc/linuxbrew-wrapper/examples/profile)
========================================================================
Don't run this as root!
/usr/lib/linuxbrew-wrapper/install:110: warning: Insecure world writable dir /root in PATH, mode 040777
它似乎与brew 以root 身份运行。
替代方法是使用sudo -u,但无法识别该命令。为什么会这样?
$ sudo -u user 'git hub user myuser'
sudo: git hub user myuser: command not found
【问题讨论】:
-
来自brew FAQ:
Homebrew is designed to work without using sudo. You can decide to use it but we strongly recommend not to do so.