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

相关内容

热门资讯

揭露一下!决战十三水作弊码,衢... 揭露一下!决战十三水作弊码,衢州都莱辅助器免费,一直真的有挂(哔哩哔哩)1、每一步都需要思考,不同水...
有挂一下!聚财平台辅助,浙江宝... 有挂一下!聚财平台辅助,浙江宝宝游戏辅助软件,真是真的有挂(哔哩哔哩);1、完成聚财平台辅助辅助器v...
解谜一下!蜀山四川小程序辅助插... 解谜一下!蜀山四川小程序辅助插件,微友联盟辅助,切实存在有挂(哔哩哔哩)1)蜀山四川小程序辅助插件辅...
必备一下!小松宿松游戏辅助,盛... 必备一下!小松宿松游戏辅助,盛世辅助器,果然是有挂(哔哩哔哩)1、许多玩家不知道小松宿松游戏辅助辅助...
关于一下!都莱软件安装辅助,广... 关于一下!都莱软件安装辅助,广东雀神挂件怎么样,竟然是真的有挂(哔哩哔哩)1)广东雀神挂件怎么样免费...
总结一下!福建微乐小程序修改器... 总结一下!福建微乐小程序修改器,微友辅助神器下载,竟然存在有挂(哔哩哔哩)福建微乐小程序修改器是不是...
揭露一下!多乐跑胡子辅助,潮汕... 揭露一下!多乐跑胡子辅助,潮汕木虱有辅助挂吗,一直真的有挂(哔哩哔哩)一、潮汕木虱有辅助挂吗可以开透...
推荐一下!微乐小程序辅助收费,... 推荐一下!微乐小程序辅助收费,创思维辅助器,都是存在有挂(哔哩哔哩)所有人都在同一条线上,像星星一样...
普及一下!逗娱碰胡辅助器,潮汕... 普及一下!逗娱碰胡辅助器,潮汕掌手娱辅助器,本来真的有挂(哔哩哔哩)1、下载好逗娱碰胡辅助器正确养号...
教你一下!老友辅助器,邯郸胡乐... 教你一下!老友辅助器,邯郸胡乐修改器,好像有挂(哔哩哔哩)1、上手简单,内置详细流程视频教学,新手小...