【问题标题】:Command Line Tools on OSX 10.9: Installed, but can't show up?OSX 10.9 上的命令行工具:已安装,但无法显示?
【发布时间】:2013-11-01 23:57:57
【问题描述】:

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

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

Failed to install command line tools on OSX Mavericks

Xcode 4.4 and later install Command Line Tools

我通过 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?

非常感谢您。

【问题讨论】:

  • 您希望在 XCode 中出现什么?
  • 我希望 CLI 会出现在“下载”中,但事实并非如此。
  • Xcode CLI 工具不再通过 Xcode 下载,因此它们不会显示在其下载管理器中。我怀疑你已经安装了它们,只是你还没有意识到!尝试从终端运行cc
  • 结果是“i686-apple-darwin11-llvm-gcc-4.2: no input files”。这意味着好吗?谢谢。
  • 这看起来不对 - cc 应该在当前版本的 Xcode 上发出叮当声。

标签: xcode macos bash osx-mavericks command-line-tool


【解决方案1】:

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

【讨论】:

    【解决方案2】:

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

    ProductName:    Mac OS X
    ProductVersion: 10.15.2
    BuildVersion:   19C57
    

    【讨论】:

      猜你喜欢
      • 2013-11-10
      • 2013-08-15
      • 1970-01-01
      • 1970-01-01
      • 2013-06-08
      • 2010-12-29
      • 2018-08-17
      • 2023-03-18
      • 1970-01-01
      相关资源
      最近更新 更多