首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >重新显示brew安装后配置文本

重新显示brew安装后配置文本
EN

Stack Overflow用户
提问于 2017-02-18 07:44:06
回答 1查看 83关注 0票数 0

通常,当我使用brew package manager在我的Macintosh计算机上安装工具和编程环境时,在安装的末尾会有一些重要的文本,描述使用我刚刚安装的工具的一些细微差别。例如,在安装redis之后,您将看到类似以下内容

代码语言:javascript
复制
$ 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?(不确定这是不是正确的术语) --并在某个结构良好的数据文件或程序中找到此文本?

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2017-03-14 18:37:04

这些被称为“警告”,并使用brew info打印。有关youtube-dl的示例,请参阅以下内容

代码语言:javascript
复制
$ 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

然后:

代码语言:javascript
复制
$ 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检索特定于公式的警告(而不是补全内容),例如:

代码语言:javascript
复制
$ 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来美化输出。

票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/42309296

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档