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

相关内容

热门资讯

科技新动态《德扑之星刷数据》a... 科技新动态《德扑之星刷数据》aapoker线上辅助挂外挂辅助器(哔哩哔哩);AI智能教程细节普及德扑...
科普(微扑克外挂确实到底是真的... 科普(微扑克外挂确实到底是真的有辅助挂的!2022已更新神器)外挂透明挂辅助透视(哔哩哔哩);1、点...
5分钟了解(心动联盟外挂透视辅... 5分钟了解(心动联盟外挂透视辅助器(透视)2020已更新)原来是有挂的(有挂程序);是一款可以让一直...
透明辅助(wpk数据)其实到底... 透明辅助(wpk数据)其实到底是真的有辅助挂(辅助挂)外挂透明挂辅助器内幕(有挂ai智能);wpk数...
透明有挂《微扑克ai辅助器苹果... 《透明有挂《微扑克ai辅助器苹果版》微扑克脚本辅助透视外挂辅助脚本(哔哩哔哩)》 微扑克脚本软件透明...
测试透明肯定!aa扑克伙牌辅助... 您好,wpk德州俱乐部这款游戏可以开挂的,确实是有挂的,需要了解加微【841106723】很多玩家在...
八分钟了解(衢州都莱双扣)外挂... 八分钟了解(衢州都莱双扣)外挂透视辅助插件(透视)黑科技辅助插件(2025已更新)(哔哩哔哩);1、...
必看攻略(wepoke好友)确... 必看攻略(wepoke好友)确实是真的有挂的(辅助挂)外挂透明挂辅助方法技巧(有挂脚本)是一款可以让...
信息共享(WePoke确实有辅... 信息共享(WePoke确实有辅助挂是真的!2025已更新plus)外挂透明挂辅助脚本(哔哩哔哩),W...
透视脚本(来玩app)确实真的... 透视脚本(来玩app)确实真的有辅助挂的(辅助挂)外挂透明挂辅助器插件(有挂专用);最新版2024是...