I installed CentOS 5 on my VMWare a few days ago. I installed gcc via yum, compiled and installed libxml2. I then tried to install PHP 5.2.3 and received this error:

configure: error: installation or configuration problem: C++ compiler cannot create executables.

It took me forever to figure this out, but I had to install the g++ library, then it compiled fine.

yum install gcc-c++

These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • del.icio.us
  • Reddit
 

6 Responses to PHP compile error on CentOS Install

  1. A-non-e-mus says:

    Thanks. This entry saved me an ass-load of time…had the same problem, and like you said, gcc-c++ fixed it. Owe some props to google, too.

  2. Tixik.com says:

    Thank you very much – not too much suggestions around the internet for this problem.

  3. Ben says:

    Thanks. Worked a treat

  4. Georgie says:

    Thanks, i checked that gcc was installed and assumed it was all installed.

  5. jon says:

    Happy to help!

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>