首页 > 代码库 > C++ preprocessor "/lib/cpp" fails sanity check See `config.log' for more details

C++ preprocessor "/lib/cpp" fails sanity check See `config.log' for more details

Ubuntu 12.04环境下编译xapian时报此错误,因为从来没有在此系统下跑过C++,所以用C++编译器的时候出现此问题

 

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

  # sudo get-apt install glibc-headers

  # sudo get-apt install gcc-c++

也可以

  #sudo apt-get install build-essential

通过第二种方法安装完毕后,编译通过

C++ preprocessor "/lib/cpp" fails sanity check See `config.log' for more details