2

我正在尝试在 OSX 10.9 Mavericks 上安装 CLT。

在我问之前,我提到了这些问题:

无法在 OSX Mavericks 上安装命令行工具

Xcode 4.4 及更高版本安装命令行工具

我通过 App Store 安装了最新版本的 XCode 5。

然后,正如各种教程中所提到的,我在 bash 中键入了“xcode-select --install”,但是,没有任何窗口告诉我安装 CLI,但是这些输出:

$ xcode-select --install
Usage: xcode-select -print-path
   or: xcode-select -switch <xcode_folder_path>
   or: xcode-select -version
Arguments:
   -print-path                     Prints the path of the current Xcode folder
   -switch <xcode_folder_path>     Sets the path for the current Xcode folder
   -version                        Prints xcode-select version information

我尝试"/System/Library/CoreServices/Install\ Command\ Line\ Developer\ Tools.app"手动运行,但没有任何显示。

我打开包装试了试

"sudo /System/Library/CoreServices/Install\ Command\ Line\ Developer\ Tools.app/Contents/MacOS/Install\ Command\ Line\ Developer\ Tools "

并像这样失败了:

"2013-11-01 19:48:45.060 Install Command Line Developer Tools[42474:507] *** CFMessagePort: bootstrap_register(): failed 1100 (0x44c) 'Permission denied', port = 0x6207, name = 'com.apple.dt.CommandLineTools.installondemand'
See /usr/include/servers/bootstrap_defs.h for the error codes."

我启用了 root 帐户并尝试在 root 下运行它,相同的输出。

不知道这意味着什么,我试过了"--pkg-info=com.apple.pkg.DeveloperToolsCLI"

似乎 CLI 不起作用,输出是:

"No receipt for 'com.apple.pkg.DeveloperToolsCLI' found at '/'."

我去了 Apple 的网站,下载并安装了这个文件:

command_line_tools_os_x_mavericks_for_xcode__late_october_2013.dmg

一切顺利,安装过程中没有报错。

但是,当我尝试在 XCode 中查找 CLI 时,它不存在。

下一次"--pkg-info=com.apple.pkg.DeveloperToolsCLI", still "No receipt for 'com.apple.pkg.DeveloperToolsCLI' found at '/'.".

现在我完全感到困惑......我该如何安装这个 CLI?

非常感谢您提前。

4

2 回答 2

2

确保您已更新到最新版本的 Mavericks,然后重新启动。再跑xcode-select --install。否则,请卸载 XCode 并从 App Store 重新安装。

于 2015-07-20T16:18:30.050 回答
0

我打电话sudo rm -rf /Library/Developer/CommandLineTools,然后xcode-select --install。sw_vers:

ProductName:    Mac OS X
ProductVersion: 10.15.2
BuildVersion:   19C57
于 2019-12-11T13:38:31.633 回答