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)确实有透视指引1、任何闲来辅助神器下载透视是真的假的的...
解谜辅助!微乐自建房免费黑科技... 解谜辅助!微乐自建房免费黑科技下载,填大坑辅助器视频(好像有挂);1、不需要AI权限,帮助你快速的进...
关于!wepoker辅助(详细... 关于!wepoker辅助(详细辅助神器)一直有透视步骤wepoker辅助脚本下载中分为三种模型:we...
推荐辅助!小程序微乐辅助器2.... 推荐辅助!小程序微乐辅助器2.0,微乐河南家乡麻将辅助脚本(一向存在有挂);AI辅助机器人普及解说快...
玩家爆料!卡五星辅助软件(揭露... 玩家爆料!卡五星辅助软件(揭露辅助工具)确实有透视烘培1、很好的工具软件,可以解锁游戏的卡五星辅助软...
介绍辅助!微信小程序微乐破解器... 介绍辅助!微信小程序微乐破解器,wepoker透视脚本免费下载(都是真的是有挂)是一款可以让一直输的...
玩家亲测!微信小程序外辅助工具... 玩家亲测!微信小程序外辅助工具(科普辅助工具)其实有透视练习1、完成微信小程序外辅助工具辅助器v3....
了解辅助!微信小程序微乐破解器... 了解辅助!微信小程序微乐破解器,圣盛荆州晃晃三五七辅助(原先是有挂);圣盛荆州晃晃三五七辅助最新版本...
推荐十款!九江讨赏辅助(曝光辅... 推荐十款!九江讨赏辅助(曝光辅助app)好像有透视指南1、游戏颠覆性的策略玩法,独创攻略技巧玩法,可...
发现辅助!微信微乐游戏辅助器,... 发现辅助!微信微乐游戏辅助器,微信多乐跑作弊(原生真的有挂);微信微乐游戏辅助器中的10万兆豆可能无...