通常,当我使用brew package manager在我的Macintosh计算机上安装工具和编程环境时,在安装的末尾会有一些重要的文本,描述使用我刚刚安装的工具的一些细微差别。例如,在安装redis之后,您将看到类似以下内容
$ brew install redis
# ... lots of stuff ...
==> Caveats
To restart redis after an upgrade:
brew services restart redis
Or, if you don't want/need a background service you can just run:
redis-server /usr/local/etc/redis.conf除了运行brew uninstall [thing];然后重新运行brew install [thing];之外,有没有办法让brew重新显示此文本?
如果不是--假设这个文本来自某个程序,有没有办法获取brew -- package?(不确定这是不是正确的术语) --并在某个结构良好的数据文件或程序中找到此文本?
发布于 2017-03-14 18:37:04
这些被称为“警告”,并使用brew info打印。有关youtube-dl的示例,请参阅以下内容
$ brew install youtube-dl
...
==> Caveats
To use post-processing options, `brew install ffmpeg` or `brew install libav`.
Bash completion has been installed to:
/home/baptiste/.linuxbrew/etc/bash_completion.d
zsh completion has been installed to:
/home/baptiste/.linuxbrew/share/zsh/site-functions
fish completion has been installed to:
/home/baptiste/.linuxbrew/share/fish/vendor_completions.d
==> Summary
? /.../Cellar/youtube-dl/2017.03.10: 11 files, 1.8M然后:
$ brew info youtube-dl
...
==> Caveats
To use post-processing options, `brew install ffmpeg` or `brew install libav`.
Bash completion has been installed to:
/home/baptiste/.linuxbrew/etc/bash_completion.d
zsh completion has been installed to:
/home/baptiste/.linuxbrew/share/zsh/site-functions
fish completion has been installed to:
/home/baptiste/.linuxbrew/share/fish/vendor_completions.d您还可以使用brew info --json=v1检索特定于公式的警告(而不是补全内容),例如:
$ brew info --json=v1 youtube-dl | jq .
[
{
"name": "youtube-dl",
"full_name": "youtube-dl",
"desc": "Download YouTube videos from the command-line",
"homepage": "https://rg3.github.io/youtube-dl/",
...
"caveats": "To use post-processing options, `brew install ffmpeg` or `brew install libav`.",
...
}
]注意,我使用了jq来美化输出。
https://stackoverflow.com/questions/42309296
复制相似问题