ERROR: “/lib/cpp” fails sanity check
Written by Mike on November 20, 2008 – 12:00 pm -ERROR:
Recently while running “./configure” while installing a component on a Server I got following Error.
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... unsupported
checking how to run the C preprocessor... /lib/cpp
configure: error: C preprocessor "/lib/cpp" fails sanity check
See `config.log' for more details.
[root@server1 ]#
_
SOLUTION:
I have checked and found that gcc and cpp modules are already installed on the server. This can be checked using command “rpm -qa | grep gcc” “rpm -qa | grep cpp“. I have searched on many websites and found that glibc-headers were not installed on the server. I have installed glibc-headers using command “yum install glibc-headers“. If you face this problem please make sure that following components are installed on the server:
1) GCC and GCC-C++
[root@server1 ~]# rpm -qa | grep gcc gcc-c++-4.1.2-42.el5 compat-gcc-34-c++-3.4.6-4 libgcc-4.1.2-42.el5 gcc-4.1.2-42.el5 compat-gcc-34-3.4.6-4 compat-libgcc-296-2.96-138 gcc-objc-4.1.2-42.el5 compat-gcc-34-g77-3.4.6-4 gcc-objc++-4.1.2-42.el5 [root@server1 ~]#
_
2) CPP
[root@server1 ~]# rpm -qa | grep cpp cpp-4.1.2-42.el5 [root@server1 ~]
_
3) GLIBC, GLIBC-DEVEL and GLIBC-HEADERS
[root@server1 ~]# rpm -qa | grep glibc glibc-2.5-24 glibc-headers-2.5-24 compat-glibc-headers-2.3.4-2.26 glibc-common-2.5-24 glibc-devel-2.5-24 compat-glibc-2.3.4-2.26 [root@server1 ~]#
_
Tags: cpp error, fails sanity check. cpp
Posted in Dedicated Server Hosting, Linux VPS Hosting |




















December 7th, 2008 at 5:13 am
[...] How to fix “/lib/cpp” fails sanity check | “/lib/cpp” fails sanity … [...]
January 15th, 2009 at 10:46 pm
Thank you for posting this, I had exactly this problem. What a pain! Your solution worked.
[CentOS 5.2x x84, tyring to install Apache 2.2.11]
February 12th, 2009 at 3:05 pm
Many thanks !
I’ve got the same trouble.
After 2 days spent to solve this problem, I found your topic. It’s work !!
Many thanks !!
[CEntOS 5.2 x86_64 GNU/Linux]
May 11th, 2009 at 9:48 am
Thanks it help
October 1st, 2009 at 4:37 am
I too have the same problem when I install the postgresql 7.3.4
Thnak very much.. This topic helps me