Tag Archives: configure: error: C++ preprocessor “/lib/cpp” fails sanity check

[Solved] configure: error: C++ preprocessor “/lib/cpp” fails sanity check

An error was reported when installing spoole through PECL

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

This is caused by the lack of corresponding libraries, so it may appear in different systems and when installing different software

Since the lack of the corresponding library, then the solution is simple, installation of the corresponding library can also be

The following is a result of my search

   Solution for /lib/cpp fails sanity check

  In some software, running . /configure will report an error with the following message

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

  Workaround: The problem is that the package for the C++ compiler is not installed, so log in as root and run the following in the terminal.

  # yum install glibc-headers

  # yum install gcc-c++

Just change Yum to apt get in mint. But I didn’t use this method myself, because build essential contains many basic libraries, so I decided to give it a try and enter the command

#sudo apt-get install build-essential

It is recommended that you use this method, because it contains many basic libraries, which may help you avoid the trouble of lacking various libraries when you have installed other software