我正在尝试使用 brew 安装 htop:
➜ ~ brew install htop
Error: You must `brew link autoconf' before htop-osx can be installed
然后我正在做
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
问题的根源是什么?
答案1
我刚刚也遇到了这个问题!
打开你的终端,尝试安装:
brew install htop
输出:
$ brew install htop 警告:您似乎安装了 MacPorts 或 Fink。与其他包管理器一起安装的软件会导致 Homebrew 出现已知问题。如果公式无法构建,请卸载 MacPorts/Fink 并重试。错误:您必须先“brew link autoconf”才能安装 htop-osx
现在,修复:
sudo brew link autoconf
如果有帮助的话请告诉我!
之后,它可能会要求您链接“htop”:
sudo brew link htop
基本上,所有“链接”问题都需要 root 创建正确的符号链接才能在您的系统上正常工作。
问候,