Ошибки при компиляции PHP на CentOS x64

В дан­ной теме я рас­ска­жу с каки­ми ошиб­ка­ми при ком­пи­ля­ции PHP на CentOS x64 мож­но столк­нуть­ся. Так же при­ве­ду гото­вые реше­ния как решить ту или иную проблему.

Thank you for reading this post, don't forget to subscribe!

configure: error: xml2-config not found. Please check your libxml2 installation.

configure: error: Cannot find OpenSSL’s

configure: error: Could not find pcre.h in /usr/local

configure: error: Could not find pcre.h in /usr/local
«—with-pcre-regex=/usr/include» \

configure: error: Could not find libpcre.(a|so) in /usr/include
«—with-pcre-regex=/usr» \

configure: error: Please reinstall the libcurl distribution -easy.h should be in /include/curl/

configure: error: libjpeg.(a|so) not found.

configure: error: libpng.(a|so) not found.

configure: error: freetype.h not found.

configure: error: Please reinstall the iconv library.
«—with-iconv» \

configure: error: mcrypt.h not found. Please reinstall libmcrypt.

configure: error: Please reinstall libmhash – I cannot find mhash.h

Note that the MySQL client library is not bundled anymore!

configure: error: Please reinstall the BZip2 distribution

configure: error: utf8_mime2text() has new signature, but U8T_CANONICAL is missing. This should not happen. Check config.log for additional information.
DISABLE IMAP
configure: error: Cannot find pspell

configure: error: Cannot find libtidy

error: xslt-config not found. Please reinstall the libxslt >= 1.1.0 distribution

collect2: ld returned 1 exit status

configure: error: mcrypt.h not found. Please reinstall libmcrypt.

With these build options a libphp5.so is not created and so Apache cannot use PHP.
On my CentOS 5.8 build I had to add the following configuration line to get that file created.
./configure –with-apxs2=/usr/sbin/apxs

configure: error: snmp.h not found. Check your SNMP installation.

checking for curl_multi_strerror in -lcurl… yes
checking for QDBM support… no
checking for GDBM support… no
checking for NDBM support… no
configure: error: DBA: Could not find necessary header file(s).

Fix:

Для тех кто хочет быст­ро испра­вить все про­бле­мы, попро­буй­те запу­стить так:

Обновление и установка средств разработки и библиотек

После чего запу­сти­те bash скрипт:

[spoiler]

 

[/spoiler]