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

问题描述

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

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

解决方法

要根据 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.

相关问答

Selenium Web驱动程序和Java。元素在(x,y)点处不可单击。其...
Python-如何使用点“。” 访问字典成员?
Java 字符串是不可变的。到底是什么意思?
Java中的“ final”关键字如何工作?(我仍然可以修改对象。...
“loop:”在Java代码中。这是什么,为什么要编译?
java.lang.ClassNotFoundException:sun.jdbc.odbc.JdbcOdbc...