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分钟了解!财神13章脚本安... 第1分钟了解!财神13章脚本安全吗(辅助)郑州麻将开挂辅助辅助-确实是真的脚本1、完成财神13章脚本...
第4分钟了解!闲逸碰胡辅助器(... 第4分钟了解!闲逸碰胡辅助器(辅助)微乐斗地主开挂辅助下载-真是是有软件1、很好的工具软件,可以解锁...
八分钟了解!约局吧辅助软件(辅... 八分钟了解!约局吧辅助软件(辅助)棋趣联盟开挂辅助工具-确实是真的软件该软件可以轻松地帮助玩家将约局...
四分钟了解!禅游指尖四川辅助脚... 四分钟了解!禅游指尖四川辅助脚本(辅助)微乐石家庄麻将开挂辅助工具-好像存在有插件禅游指尖四川辅助脚...
第四分钟了解!八闽状元郎破解版... 第四分钟了解!八闽状元郎破解版辅助(辅助)丫丫湖南麻将2开挂辅助插件-本来是有辅助1、这是跨平台的八...
五分钟了解!微信小程序雀神挂件... 五分钟了解!微信小程序雀神挂件下载(辅助)微乐三打一开挂辅助辅助-一直是有修改器1、操作简单,无需微...
4分钟了解!新众亿辅助(辅助)... 4分钟了解!新众亿辅助(辅助)雀神广东麻将开挂辅助下载-本来是真的辅助器1、完成新众亿辅助辅助器v3...
第五分钟了解!丫丫陕西插件(辅... 第五分钟了解!丫丫陕西插件(辅助)天天九州麻将开挂辅助平台-本来有挂脚本1、进入游戏-大厅左侧-新手...
第9分钟了解!榕城510k有没... 第9分钟了解!榕城510k有没有挂(辅助)中至抚州麻将开挂辅助app-本来真的有神器1、让任何用户在...
9分钟了解!新九哥脚本下载(辅... 9分钟了解!新九哥脚本下载(辅助)九九互娱开挂辅助下载-一直真的是有神器亲,关键说明,新九哥脚本下载...