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

相关内容

热门资讯

透视辅助!wejoker辅助器... 透视辅助!wejoker辅助器怎么卖,佛手在线大菠萝辅助,关于开挂辅助工具(透视竟然有挂) >>您好...
热点推荐“xpoker怎么辅助... 开挂教程视频分享装挂详细步骤在当今的网络游戏中,作为一种经典的娱乐方式,吸引了无数玩家的参与。尤其是...
透视辅助!wepoker透视脚... 透视辅助!wepoker透视脚本是什么,aapoker插件,科技开挂辅助工具(透视有挂解密)【无需打...
推荐一款“hhpkoer辅助挂... 您好:这款游戏可以开挂的,确实是有挂的,很多玩家在这款游戏中打牌都会发现很多用户的牌特别好,总是好牌...
透视辅助!hh poker辅助... hh poker辅助器先试用是一款专注玩家量身打造的游戏记牌类型软件,在hh poker辅助器先试用...
我来向大家传授“wepoker... 我来向大家传授“wepoker永久免费脚本”开挂(透视)辅助平台(科技教程有挂技术)您好:这款游戏可...
透视辅助!wepoker怎么设... 透视辅助!wepoker怎么设置盖牌,拱趴大菠萝十三水辅助,分享开挂辅助平台(透视有挂教程);无需打...
重磅来袭“wepoker可以免... 重磅来袭“wepoker可以免费玩吗”开挂(透视)辅助安装(新2026教程有挂猫腻)1、下载安装好,...
透视辅助!aa poker透视... 透视辅助!aa poker透视软件,wepoker插件功能辅助器,教会开挂辅助神器(透视有挂总结);...
实测教程“wepoker免费脚... 实测教程“wepoker免费脚本”开挂(透视)辅助安装(切实教程有挂秘笈) 【无需打开直接搜索加薇1...