Mac更新完系统出现两步报错及解决方法
创始人
2024-12-28 23:07:04
0

Mac更新完系统,通过命令行准备编译C++文件时,报错:

xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools) 

解决方法:更新xcode,在命令行运行

xcode-select --install 

安装完,重新编译,报错:

CMake Error at /opt/homebrew/Cellar/cmake/3.25.0/share/cmake/Modules/CMakeTestCCompiler.cmake:70 (message):   The C compiler      "/Library/Developer/CommandLineTools/usr/bin/cc"    is not able to compile a simple test program.    It fails with the following output:      Change Dir: /Users/caishuxian/GCNO/build/CMakeFiles/CMakeScratch/TryCompile-76ti7x          Run Build Command(s):/usr/bin/make -f Makefile cmTC_39711/fast && /Library/Developer/CommandLineTools/usr/bin/make  -f CMakeFiles/cmTC_39711.dir/build.make CMakeFiles/cmTC_39711.dir/build     Building C object CMakeFiles/cmTC_39711.dir/testCCompiler.c.o     /Library/Developer/CommandLineTools/usr/bin/cc   -arch arm64 -MD -MT CMakeFiles/cmTC_39711.dir/testCCompiler.c.o -MF CMakeFiles/cmTC_39711.dir/testCCompiler.c.o.d -o CMakeFiles/cmTC_39711.dir/testCCompiler.c.o -c /Users/caishuxian/GCNO/build/CMakeFiles/CMakeScratch/TryCompile-76ti7x/testCCompiler.c     Linking C executable cmTC_39711     /opt/homebrew/Cellar/cmake/3.25.0/bin/cmake -E cmake_link_script CMakeFiles/cmTC_39711.dir/link.txt --verbose=1     /Library/Developer/CommandLineTools/usr/bin/cc  -arch arm64 -Wl,-search_paths_first -Wl,-headerpad_max_install_names CMakeFiles/cmTC_39711.dir/testCCompiler.c.o -o cmTC_39711      ld: library 'System' not found     clang: error: linker command failed with exit code 1 (use -v to see invocation)     make[1]: *** [cmTC_39711] Error 1     make: *** [cmTC_39711/fast] Error 2                  CMake will not be able to correctly generate this project. Call Stack (most recent call first):   CMakeLists.txt:3 (project) 

解决方法:删除原有 build 文件夹,重新创建新 build 文件夹。

相关内容

热门资讯

受玩家影响!微信游戏锄大地辅助... 受玩家影响!微信游戏锄大地辅助器,佛手在线大菠萝辅助,解说技巧(一贯真的是有挂)-哔哩哔哩1、操作简...
透视数据!哈糖大菠萝挂,wep... 透视数据!哈糖大菠萝挂,wepoker免费脚本,妙计教程(本来真的是有挂)-哔哩哔哩1、很好的工具软...
透视小程序!wpk系统是否存在... 透视小程序!wpk系统是否存在辅助行为(透视)开挂辅助技巧(真是是真的挂)-哔哩哔哩1、实时wpk系...
据玩家消息!休闲九九破解版,新... 据玩家消息!休闲九九破解版,新海贝辅助器试用,揭秘教程(好像真的是有挂)-哔哩哔哩新海贝辅助器试用辅...
透视ai代打!epoker透视... 透视ai代打!epoker透视,hhpoker辅助靠谱吗,攻略教程(都是有挂)-哔哩哔哩1、hhpo...
透视安卓版!wepoker透视... 透视安卓版!wepoker透视底牌(透视)开挂辅助器(都是真的是有挂)-哔哩哔哩wepoker透视底...
透视总结!wepoker钻石怎... 透视总结!wepoker钻石怎么看底牌,德普之星的辅助工具介绍,方针教程(都是是真的挂)-哔哩哔哩德...
无独有偶!烧饼游戏修改器,边锋... 无独有偶!烧饼游戏修改器,边锋老友填大坑辅助,技巧教程(切实是有挂)-哔哩哔哩1、进入游戏-大厅左侧...
透视工具!wepokerplu... 透视工具!wepokerplus辅助,德州局脚本,技法教程(原来是有挂)-哔哩哔哩进入游戏-大厅左侧...
透视安卓版本!pokemmo手... 透视安卓版本!pokemmo手机版透视脚本(透视)开挂辅助技巧(其实有挂)-哔哩哔哩1)pokemm...