Mac OS Sierra:检查C编译器是否正常工作……没有

Mac OS Sierra:检查C编译器是否正常工作……没有,第1张

概述我想在我的MacOS Sierra系统上编译一个C库,但是我收到以下错误: checking for a BSD-compatible install... /usr/local/bin/ginstall -cchecking whether build environment is sane... yeschecking for a thread-safe mkdir -p... /usr/ 我想在我的MacOS SIErra系统上编译一个C库,但是我收到以下错误:

checking for a BSD-compatible install... /usr/local/bin/ginstall -cchecking whether build environment is sane... yeschecking for a thread-safe mkdir -p... /usr/local/bin/gmkdir -pchecking for gawk... nochecking for mawk... nochecking for nawk... nochecking for awk... awkchecking whether make sets $(MAKE)... yeschecking whether make supports nested variables... yeschecking for gcc... clangchecking whether the C compiler works... noconfigure: 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=clangxcode-select --install

并接受许可.但没有任何效果.是否有任何新的步骤要考虑SIErra以使命令行工具正常运行?

解决方法@H_502_30@ 启动Xcode,选择“首选项”,然后选择“位置”.您会注意到’命令行工具’中的下拉控件.选择最新版本,关闭对话窗口,然后再次调用brew.重新启动计算机并再次运行它. 总结

以上是内存溢出为你收集整理的Mac OS Sierra:检查C编译器是否正常工作……没有全部内容,希望文章能够帮你解决Mac OS Sierra:检查C编译器是否正常工作……没有所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/web/1018027.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-05-23
下一篇 2022-05-23

发表评论

登录后才能评论

评论列表(0条)

保存