gpt4 book ai didi

xcode - Apple 命令行工具 vs XCode 命令行工具?

转载 作者:行者123 更新时间:2023-12-05 03:25:52 24 4
gpt4 key购买 nike

我下载了 XCode 并通过转到 Preferences -> Locations 确保安装了 XCode 命令行工具:

enter image description here

问题:当我运行 brew upgrade 时会抛出此错误:

Error: python@3.10: the bottle needs the Apple Command Line Tools to be installed.
You can install them, if desired, with:
xcode-select --install

我想知道的:XCode 命令行工具和这些 Apple 命令行工具有什么区别?我需要同时安装两者吗?

我在 OSX 12.3.1 上,XCode 13.3.1。

最佳答案

Apple Command Line Tools 只是 XCode Command Line Tools 的别称。

在你的终端,做:

xcode-select --install

Homebrew 应该可以工作了。

Homebrew issue备注:

The reason we need the Command Line Tools rather than just Xcode.app is for a few reasons:

  • The CLT contains more SDKs than Xcode - Xcode usually only contains one SDK, and it may be newer than your OS, while the CLT always has a compatible SDK. Having a matching SDK is very important for some formulae.
  • The CLT is in a fixed location /Library/Developer/CommandLineTools while Xcode is not. This matters as some formulae (including Python) bake in paths into files at compile-time - if they pointed to Xcode then it will only work for people who have Xcode installed in the same place.

关于xcode - Apple 命令行工具 vs XCode 命令行工具?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/71903591/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com