【问题标题】:Not able to install anything with brew无法使用 brew 安装任何东西
【发布时间】:2021-05-02 02:19:59
【问题描述】:

我正在尝试使用自制软件安装 carthage,并且正在运行以下问题。不仅 carthage,我无法使用 brew 安装任何软件包。

==> Searching for similarly named formulae...
Error: No similarly named formulae found.
Error: No available formula or cask with the name "carthage".
==> Searching for a previously deleted formula (in the last month)...
Error: No previously deleted formula found.
==> Searching taps on GitHub...
Error: No formulae found in taps.
userXXXXXX ~ % brew info carthage
Error: No available formula or cask with the name "carthage".
==> Searching for a previously deleted formula (in the last month)...
Error: No previously deleted formula found. 

我安装了自制软件 /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" 我尝试使用以下命令卸载,看看是否可以解决问题。

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall.sh)" 

并再次安装自制软件,但仍然出现同样的错误。 卸载时-我收到了这些消息。删除这些文件是否安全?这是其他包没有安装的原因吗?

Homebrew uninstalled!
The following possible Homebrew files were not deleted:
/usr/local/Frameworks/
/usr/local/Homebrew/
/usr/local/McAfee/
/usr/local/bin/
/usr/local/etc/
/usr/local/include/
/usr/local/jamf/
/usr/local/lib/
/usr/local/opt/
/usr/local/sbin/
/usr/local/share/
/usr/local/var/
You may wish to remove them yourself.

系统配置: macOS Catalina - V 10.15.6 Xcode (11.0) 节点:v10.14.1 当我运行 brew doctor 时,我会看到很多带有以下消息的 .h 文件。

Warning: Unbrewed header files were found in /usr/local/include.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.

请帮忙。我不确定我在这里做错了什么。

【问题讨论】:

    标签: xcode macos installation homebrew carthage


    【解决方案1】:

    我在卸载 brew 并删除安装中创建的每个文件夹时解决了这个错误,检查 dir 文件夹 /usr/local。

    【讨论】:

    • 嗨@pedro,感谢您的回答。我已经尝试卸载并且 /usr/local 下的一些没有被删除。我在描述中提到了文件夹名称。我可以继续删除 /usr/local/Homebrew/ - 这有帮助吗?
    • 我卸载了 brew 并删除了所有 /usr/local/ 内容。我的问题是 /usr/local/ 中的任何文件夹都已损坏。我删除了所有,我会重新安装。它对我有用
    【解决方案2】:

    我使用了brew doctor 并遵循了一些警告输出的建议命令。这样就成功了!

    【讨论】:

    • 它确实对我有用,谢谢
    • 是的,这行得通。按照 - brew doctor 的说明进行操作
    猜你喜欢
    • 1970-01-01
    • 2014-06-08
    • 1970-01-01
    • 1970-01-01
    • 2020-11-27
    • 2013-06-29
    • 1970-01-01
    • 2018-09-20
    • 2017-03-30
    相关资源
    最近更新 更多