brew install package 要求从不存在的路径安装命令行工具

brew install package 要求从不存在的路径安装命令行工具

我搞砸了我的命令行工具。我已经安装了它们,我还从苹果开发者网站安装了 beta 2 macOS 10 版本,因为命令brew install putty要求我删除 Xcode 或升级它。(这就是我搞砸的地方,我没有安装升级版的 Xcode.app,而是安装了 Xcode 命令行工具 10.14)

所以现在命令brew install putty给出错误

Error: Your Xcode (9.4.1) is too outdated.
Please update to Xcode 10.0 (or delete it).
Xcode can be updated from
  https://developer.apple.com/download/more/

Error: The Command Line Tools header package must be installed on Mojave.
The installer is located at:
  /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg

当我运行时,xcode-select --install它说命令行工具已安装。

如果我删除 Xcode.app,它会显示:

xcrun: error: active developer path ("/Applications/Xcode.app/Contents/Developer") does not exist
Use `sudo xcode-select --switch path/to/Xcode.app` to specify the Xcode that you wish to use for command line developer tools, or use `xcode-select --install` to install the stan
dalone command line developer tools.
See `man xcode-select` for more details.
Error: The Command Line Tools header package must be installed on Mojave.
The installer is located at:
  /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg
Error: Git must be installed and in your PATH!
xcrun: error: active developer path ("/Applications/Xcode.app/Contents/Developer") does not exist
Use `sudo xcode-select --switch path/to/Xcode.app` to specify the Xcode that you wish to use for command line developer tools, or use `xcode-select --install` to install the stan
dalone command line developer tools.
See `man xcode-select` for more details.
Error: The Command Line Tools header package must be installed on Mojave.
The installer is located at:
  /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg

上述错误中提到的我要安装的文件路径pkg不存在

相关内容