几周以来,我一直试图解决这个问题。
当我以yt-project(http://yt-project.org/#getyt)指示运行bash install_script.sh
文件时,它会输出以下错误:
gcc -fPIC -c blocksort.c
make: gcc: No such file or directory
make: *** [blocksort.o] Error 1
我与yt-users邮件列表中的某个人联系,他让我检查了我的xcode版本。我跑了xcode-select -version
,我收到了:
xcode-select version 2003.
这绝对是过时的。
我尝试运行xcode-select --install
以确保我有CLT,但它只返回选项菜单以输入xcode-select。什么都没发生。
我直接从开发者网站安装了CLT,就像在Xcode 5.0及更高版本中一样,它不在Preferences-> Downloads中。它似乎安装正确,但如果我无法获得高于2003的版本号,似乎Xcode本身安装不正确。
我尝试卸载并重新安装Xcode,但问题没有改变。根据{{3}},我检查了Xcode上的路径,看起来是正确的。 xcodebuild -version
的输出是
Error: Can't run /Library/Developer/CommandLineTools/usr/bin/xcodebuild (no such file).
在确认我没有/Library/Developer
文件夹后,我尝试了xcode-select --install not running中列出的命令。
xcode-select --print-path
的路径是
/Library/Developer/CommandLineTools
当我gcc --version
时,它会返回
-bash: gcc: command not found
如何获得正确的xcode-select binary
?
我在命令行非常业余,可能有许多不正确的假设,我陷入其中。
感谢您的帮助!