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

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


参考链接:

error: C++ preprocessor "/lib/cpp" fails sanity check错误解决方法


一:错误发生情景:

安装gcc时,使用make命令时,报如下错误:

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

二、错误原因:

缺少必要的C++库。


三、解决:

(1) CentOS系统,运行命令:
  yum install glibc-headers
  yum install gcc-c++
(2) Ubuntu系统中,运行命令:
  apt-get install build-essential
  apt-get install g++


原文地址:https://www.cnblogs.com/gyfluck/p/10538330.html