shoudi_study

导航

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

在安装protobuf,知悉./Configure时候报错“error: C++ preprocessor "/lib/cpp" fails sanity check”

下面是转载过来的 mark

主要就是安装个buildf-essential包,这个包包含很多基本库

  在某些软件的时候,运行./configure 会报错,错误提示为:

  configure: error: C++ preprocessor “/lib/cpp” fails sanity 
  check See `config.log’ for more details

  解决办法:出现该情况是由于c++编译器的相关package没有安装,以root用户登陆,在终端上执行:

  # yum install glibc-headers

  # yum install gcc-c++

这位同志使用的是红帽子版本,对于ubuntu来说,只需把yum改成apt-get即可。

 

但我自己并没有使用此方法,因为build-essential包含许多基本库,因此我决定尝试一把,输命令

#sudo apt-get install build-essential

再次运行./configure的时候成功通过~~

建议大家使用这种方法,因为它包含许多基本库,说不定让你已经安装其它软件时免除缺少各种库的烦恼。

 

posted on 2014-11-11 15:44  better_me  阅读(623)  评论(0编辑  收藏  举报