我从 GitHub ( Homebrew/brew )下载了一个存档并将其解压到下面的临时目录中/root(在 的帮助下sudo)。如果我这样做,ls -l我会看到一个扩展属性:
total 0
drwxr-xr-x@ 16 root wheel 512 Jul 2 09:30 brew-master
Run Code Online (Sandbox Code Playgroud)
如果我这样做ls -l@(感谢这个问题的答案),我会得到以下输出:
total 0
drwxr-xr-x@ 16 root wheel 512 Jul 2 09:30 brew-master
com.apple.quarantine 59
Run Code Online (Sandbox Code Playgroud)
如果我这样做,ls -l@ brew-master我会得到以下输出:
total 48
-rw-r--r--@ 1 root wheel 98 Jul 2 09:30 CHANGELOG.md
com.apple.quarantine 59
-rw-r--r--@ 1 root wheel 3161 Jul 2 09:30 CODE_OF_CONDUCT.md
com.apple.quarantine 59
-rw-r--r--@ 1 root wheel 720 Jul …Run Code Online (Sandbox Code Playgroud) docs.brew.sh 中的手动安装说明/usr/local非常简短且不能令人满意,如果我在不使用 的子目录中尝试它,则会导致一些错误sudo。这个问题中的方向及其接受的答案要好一些,但如果不使用 也无法工作sudo。
我知道我可能需要使用sudo来安装 Homebrew 本身,但希望我不需要继续使用sudo来安装新软件包、更新等(标准 Homebrew 安装脚本似乎使用,sudo但仅在绝对必要时使用,而标准结果是无需使用sudo来安装新包、更新等)
我应该如何手动将 Homebrew 安装到/usr/local子目录中?
手动安装 info/usr/local子目录的动机:
避免用户sudo安装后使用的动机: