在macOS上安装Homebrew时跳过命令行工具的安装

时间:2018-07-18 19:46:00

标签: macos homebrew xcode-command-line-tools

我正在macOS High Sierra 10.13上安装自制软件。我已经安装了Xcode命令行工具,这是自制软件的要求。开始安装自制软件时,我不得不安装命令行工具(或中止安装)。当我这样做时,安装过程将挂起。我不明白为什么挂起,但更重要的是,当我可以证明它们已在我的计算机上可用时,我不明白为什么它试图安装CLT。

2 个答案:

答案 0 :(得分:1)

  1. 右键单击下面的链接,并将其另存为homebrew-install.rb https://raw.githubusercontent.com/Homebrew/install/master/install

  2. 使用文本编辑器打开homebrew-install.rb,然后将方法should_install_command_line_tools?的定义更改为return false

  3. 运行ruby homebrew-install.rb

答案 1 :(得分:0)

就我而言,可以安装xcode命令行工具。

我的环境是Mac OS。

在终端中输入

xcode-select --install

安装需要花费一些时间

在本文[https://docs.brew.sh/Installation]中查看macOS要求

祝你好运。

相关问题