c程序编译错误处理办法

error: C++ preprocessor "/lib/cpp" fails sanity check

问题的根源是缺少必要的C++库。如果是CentOS系统,运行,如下命令解决:

yum install -y glibc-headers  gcc-c++ 

Ubuntu系统中,运行命令:

apt-get install build-essential g++
原文地址:https://www.cnblogs.com/hiyang/p/14548674.html