有没有办法查看任何已安装的brew包是否具有特定的依赖关系?

jtl*_*sey 26 homebrew dependency-management homebrew-cask

如果您想列出所有包依赖项并手动检查每个包依赖项,这个类似的问题这个问题提供了信息。在我的系统上,一些包有超过 30 个依赖项。我正在检查每个已安装的包,试图找到哪一个(如果有)具有 java 依赖项。

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

Ort*_*kni 48

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

brew uses --recursive --installed java
Run Code Online (Sandbox Code Playgroud)

根据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.
Run Code Online (Sandbox Code Playgroud)