的Mac OS塞拉利昂:检查C编译器是否工作......没有

问题描述:

我想编译我的MacOS系统塞拉在C库,但我收到以下错误:的Mac OS塞拉利昂:检查C编译器是否工作......没有

checking for a BSD-compatible install... /usr/local/bin/ginstall -c 
checking whether build environment is sane... yes 
checking for a thread-safe mkdir -p... /usr/local/bin/gmkdir -p 
checking for gawk... no 
checking for mawk... no 
checking for nawk... no 
checking for awk... awk 
checking whether make sets $(MAKE)... yes 
checking whether make supports nested variables... yes 
checking for gcc... clang 
checking whether the C compiler works... no 
configure: error: in `/Users/macuser/Downloads/libr': 
configure: error: C compiler cannot create executables 

我尝试设置符号链接如建议在OS X 10.9.2: checking whether the C compiler works... no

sudo ln -s /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeD‌​efault.xctoolchain/ /Applications/Xcode.app/Contents/Developer/Toolchains/OSX10.‌​11.xctoolchain 

我尝试设置CC路径,并安装了Xcode作为在https://apple.stackexchange.com/questions/216573/cant-compile-source-code-on-mac

export CC=clang 
xcode-select --install 

并接受许可证。但没有任何工作。在Sierra上有没有新的步骤可以让命令行工具正常运行?

启动Xcode,选择'首选项',然后选择'位置'。您会注意到'命令行工具'中的下拉控件。选择最新版本,关闭对话窗口,然后再次调用brew。重新启动计算机并再次运行它。

+1

我正在使用SSH连接到MacOS,我该怎么做你说的通过命令行? – SebMa