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

ubuntu 10.04.3 LTS版本安装tigervnc的时候出现如下错误

checking how to run the C++ preprocessor... /lib/cpp
configure: error: C++ preprocessor "/lib/cpp" fails sanity check
See `config.log' for more details.

这是缺少相应的库导致的,所以可能在不同系统,安装不同软件的时候都可能出现。

既然缺少相应的库,那解决方法也就简单了,安装相应的库也可。

以下是我搜得的一个結果,原文如下:

   /lib/cpp fails sanity check的解决

  在某些软件的时候,运行./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 @ 2011-11-04 17:08  HustQuan  阅读(40845)  评论(0编辑  收藏  举报