【问题标题】:Is there a way to see if any installed brew package has a specific dependency?有没有办法查看任何已安装的 brew 包是否具有特定的依赖关系?
【发布时间】:2021-05-14 06:27:14
【问题描述】:

This similar questionthis one 提供信息,如果您想列出所有包依赖项并手动检查每个依赖项。在我的系统上,一些包有 30 多个依赖项。我正在检查每个已安装的包,试图找出哪个包有 java 依赖项。

我正在尝试以一种方式查看所有已安装的软件包,包括使用 cask 安装的软件包。有没有办法查看任何已安装的 brew 包是否具有特定的依赖关系?

【问题讨论】:

  • 试试brew uses --recursive java。在您的终端上键入brew help uses 以查找在命令行不产生任何输出时您可以在命令行中添加哪些其他选项。
  • 谢谢@axiac!它也检查木桶,并且 wc 给了我总数。 brew uses --recursive java | wc -l

标签: homebrew dependency-management homebrew-cask


【解决方案1】:

要根据 java 包使用查看所有已安装的包:

brew uses --recursive --installed java

man brew

uses [options] formula [...]
   Show  formulae  and  casks that specify formula as a dependency; that is, show dependents of formula. When given multiple formula argu-
   ments, show the intersection of formulae that use formula. By default, uses shows all formulae and casks  that  specify  formula  as a
   required or recommended dependency for their stable builds.

   --recursive
          Resolve more than one level of dependencies.

   --installed
          Only list formulae and casks that are currently installed.

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2013-02-09
    • 2015-08-10
    • 2013-05-03
    • 2015-11-22
    • 2019-08-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多