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 文件夹。

相关内容

热门资讯

黑科技app!aapoker辅... 黑科技app!aapoker辅助器怎么用(ai辅助)太坑了有挂(我来教教你黑科技规律)-哔哩哔哩aa...
黑科技脚本"德扑之星... 黑科技脚本"德扑之星软件辅牌器"wopoker辅助真的假的(都是是真的有挂)-哔哩哔哩1、实时德扑之...
黑科技游戏(aapoker辅助... 黑科技游戏(aapoker辅助工具存在吗)外挂黑科技辅助下载(透视)本来存在有挂(黑科技解说)-哔哩...
黑科技透明挂!wpk辅助神器,... 黑科技透明挂!wpk辅助神器,智星德州菠萝怎么开挂,可靠教程(有挂了解)-哔哩哔哩1、智星德州菠萝怎...
黑科技教程!微扑克发牌为什么这... 黑科技教程!微扑克发牌为什么这么离谱(黑科技)太坑了存在有挂(总结教程黑科技解说)-哔哩哔哩;1.微...
黑科技辅助"云扑克辅... 黑科技辅助"云扑克辅助透视"aapoker安卓怎么下载(竟然存在有挂)-哔哩哔哩;1、aapoker...
黑科技辅助(wpkai透视外挂... 黑科技辅助(wpkai透视外挂售卖)外挂透视辅助教程(透视)本来真的有挂(黑科技方法)-哔哩哔哩1、...
黑科技机器人!wepoke黑科... 黑科技机器人!wepoke黑科技功能,德扑之星作弊事件,详细教程(有挂辅助挂)-哔哩哔哩;是一款可以...
黑科技存在!微扑克ai机器人打... 黑科技存在!微扑克ai机器人打德州(ai代打)太坑了存在有挂(攻略教程黑科技方法)-哔哩哔哩;微扑克...
黑科技挂"aa扑克平... 黑科技挂"aa扑克平台的机制"wpk透明挂(切实有挂)-哔哩哔哩;1、用户打开应用后不用登录就可以直...