如何使用 Homebrew 在 OS X 上安装 htop?

Vol*_*kiy 11 homebrew htop macos

我正在尝试使用 brew 安装 htop:

?  ~  brew install htop
Error: You must `brew link autoconf' before htop-osx can be installed
Run Code Online (Sandbox Code Playgroud)

然后我在做

brew link autoconf
Linking /usr/local/Cellar/autoconf/2.69... Warning: Could not link autoconf. Unlinking...
Error: Could not symlink file: /usr/local/Cellar/autoconf/2.69/share/emacs/site-lisp/autotest-mode.elc
Target /usr/local/share/emacs/site-lisp/autotest-mode.elc already exists. You may need to delete it. 
To force the link and overwrite all other conflicting files, do:
brew link --overwrite formula_name
To list all files that would be deleted:
brew link --overwrite --dry-run formula_name
Run Code Online (Sandbox Code Playgroud)

问题的根源是什么?

Jar*_*ows 10

我自己刚刚遇到了这个问题!

打开你的终端,尝试安装:

brew install htop
Run Code Online (Sandbox Code Playgroud)

输出:

$ brew install htop 警告:您似乎安装了 MacPorts 或 Fink。与其他包管理器一起安装的软件会导致 Homebrew 出现已知问题。如果公式无法构建,请卸载 MacPorts/Fink 并重试。错误:在安装 htop-osx 之前,您必须“brew link autoconf”

现在,修复:

sudo brew link autoconf
Run Code Online (Sandbox Code Playgroud)

让我知道这是否有帮助!

之后,它可能会要求您链接“htop”:

sudo brew link htop
Run Code Online (Sandbox Code Playgroud)

基本上,所有“链接”问题都需要 root 才能创建正确的符号链接,以便在您的系统上正常工作。

问候,