若报“找不到命令 gcc”或“no acceptable C compiler found in $PATH”,说明未安装编译器或PATH 配置不当,可先安装开发工具组:sudo yum group install “Development Tools”,或 sudo yum install gcc gcc-c++。
若出现“error while loading shared libraries: libstdc++.so.6: version `CXXABI_x.x.x’ not found”等链接期库版本不匹配,说明运行库版本不一致,需检查 LD_LIBRARY_PATH、/etc/ld.so.conf 或使用 -Wl,-rpath 指定运行时库路径,避免误覆盖系统库。
构建日志过大或需回溯时,优先使用“2>&1 | tee build.log”保留完整输出,便于搜索首个报错位置。