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

相关内容

热门资讯

最新研发!wepoker免费辅... 最新研发!wepoker免费辅助器,创思维激k看底牌辅助,原来真的有辅助脚本(有挂工具)1、游戏颠覆...
外挂手筋!德普之星辅助器,德州... 外挂手筋!德普之星辅助器,德州局怎么透视-确实是有辅助工具(哔哩哔哩)在进入德州局怎么透视软件靠谱后...
透视游戏!hhpoker为什么... 透视游戏!hhpoker为什么一直输(透视)果然是有辅助平台(有挂技巧)-哔哩哔哩1、hhpoker...
外挂烘培!pokerworld... 外挂烘培!pokerworld破解版下载,大菠萝手游辅助-果然一直总是有辅助方法(哔哩哔哩)所有人都...
科技通报!约局吧德州真的有透视... 科技通报!约局吧德州真的有透视挂吗,非凡贪玩挂,一直存在有辅助神器(有挂头条)1、约局吧德州真的有透...
现有说明如下!hhpoker免... 现有说明如下!hhpoker免费透视脚本(透视)果然真的有辅助插件(有挂存在)-哔哩哔哩1、不需要A...
外挂步骤!德普之星透视辅助插件... 外挂步骤!德普之星透视辅助插件,约局吧怎么看有没有挂-真是存在有辅助app(哔哩哔哩)一、约局吧怎么...
一分钟教会你!aapoker透... 一分钟教会你!aapoker透视脚本下载,皮皮跑子辅助,总是存在有辅助插件(有挂详细)1、实时皮皮跑...
迎来新发展!如何下载wepok... 迎来新发展!如何下载wepoker安装包(透视)真是真的有辅助软件(有挂详细)-哔哩哔哩1、超多福利...
外挂模块!德扑之心免费透视,智... 外挂模块!德扑之心免费透视,智星菠萝可以辅助吗-真是一直都是有辅助攻略(哔哩哔哩)1、许多玩家不知道...