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: ,
Posted in Dedicated Server Hosting, Linux VPS Hosting | 7 Comments »

7 Comments to “ERROR: “/lib/cpp” fails sanity check”

  1. toon rape Says:

    [...] How to fix “/lib/cpp” fails sanity check | “/lib/cpp” fails sanity … [...]

  2. Corey Says:

    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]

  3. Stephan Says:

    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]

  4. Stephen Says:

    Thanks it help

  5. Vinoth Says:

    I too have the same problem when I install the postgresql 7.3.4

    Thnak very much.. This topic helps me

  6. Glowa Says:

    hi,

    for me solution was yum install kernel-headers

    @centos 5.8 with cloudlinux

  7. Configure Error C Preprocessor Lib Cpp Fails Sanity Check Says:

    [...] ERROR: “/lib/cpp” fails sanity check – VPS Hosting – Nov 20, 2008. configure while installing a component on a Server I got following. /lib/cpp configure: error: C preprocessor /lib/cpp fails sanity check See. [...]

Leave a Comment

RSS

  • Subscribe Me

  • Tag Cloud

  • Archives