配置PHP 7.0.1时,如何修复C ++预处理器“/ lib / cpp”会导致健全性检查错误

I installed gcc 5.3.0 from source code on mac os x 10.11, and i have set gcc 5.3.0 in the environment variable $PATH.

But when I configure PHP 5.5.30, it shows

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

How can i fix this? How can i use c++/cpp from gcc 5.3.0 instead of the old version of gnu c++?

You'll need to install g++; I once had this problem on an RHEL 5.2 distribution, and the problem was solved by installing the 'gcc-c++' rpm.