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

相关内容

热门资讯

透视软件!fishpoker透... 大家肯定在之前fishpoker透视辅助器官网入口或者fishpoker透视辅助器官网入口中玩过透视...
hhpoker透视脚本!wep... hhpoker透视脚本!wepoker破解器激活码(透视)竟然是有挂(分享教程)一、wepoker破...
aapoker辅助!微扑克辅助... aapoker辅助!微扑克辅助器ios(透视)本然是有挂(详细辅助玩家交流)1、下载好微扑克辅助器i...
透视智能ai!德扑之星发牌规律... 透视智能ai!德扑之星发牌规律图,wepoker透视真的假的(详细辅助技巧教程);玩家在德扑之星发牌...
hhpoker透视方法!wep... hhpoker透视方法!wepoker轻量版透视方法(透视)其实真的有挂(力荐教程)1)wepoke...
透视透视!wepokerplu... aapoker透视辅助下载赢率提升策略‌;透视透视!wepokerplus开挂,aapoker透视辅...
aapoker透明挂!wepo... aapoker透明挂!wepoke真的有挂(透视)一直有挂(详细辅助推荐十款)是一款可以让一直输的玩...
透视玄学!HHpoker德州有... 透视玄学!HHpoker德州有挂吗,ropalpoker辅助器最新版本更新内容介绍(详细辅助规律教程...
hhpoker开辅助软件!德普... hhpoker开辅助软件!德普之星透视辅助(透视)果然有挂(分享教程)1、德普之星透视辅助系统规律教...
德州之星有辅助挂!德州AI智能... 德州之星有辅助挂!德州AI智能辅助机器人(透视)原生真的有挂(详细辅助重大通报),您好,德州AI智能...