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

相关内容

热门资讯

推荐一款!aapoker辅助挂... 推荐一款!aapoker辅助挂多功能透视工具,原来是真的有挂(有挂解密)1、下载好aapoker正确...
揭秘几款!wepoker辅助挂... 揭秘几款!wepoker辅助挂多功能透视工具,其实真的是有挂(竟然有挂)1、在wepoker插件功能...
总算了解!wepoker辅助挂... 总算了解!wepoker辅助挂多功能透视工具,好像是有挂(有挂细节)1、用户打开应用后不用登录就可以...
玩家必备科技!德扑之星辅助挂多... 玩家必备科技!德扑之星辅助挂多功能透视工具,一直真的有挂(讲解有挂)进入游戏-大厅左侧-新手福利-激...
教程辅助!红龙poker辅助挂... 教程辅助!红龙poker辅助挂多功能透视工具,竟然是真的有挂(有挂技巧)1、进入游戏-大厅左侧-新手...
玩家爆料!WPK辅助挂多功能透... 玩家爆料!WPK辅助挂多功能透视工具,确实是有挂(有挂方法)WPK辅助器是一种具有地方特色的麻将游戏...
一分钟了解!德普之星辅助挂多功... 一分钟了解!德普之星辅助挂多功能透视工具,真是真的是有挂(真实有挂)1、操作简单,无需德普之星手机版...
科技通报!wpk辅助挂多功能透... 科技通报!wpk辅助挂多功能透视工具,其实是有挂(竟然有挂)1、wpk辅助软件下载优化,wpk底牌透...
分享个大家!AAPoKer辅助... 分享个大家!AAPoKer辅助挂多功能透视工具,果然真的有挂(有挂方针)运AAPoKer辅助工具,进...
技术分享!wepoker辅助挂... 技术分享!wepoker辅助挂多功能透视工具,竟然有挂(有挂解惑)1、让任何用户在无需wepoker...