CentOS x64 里php 源码编译出错参见情况及解决办法

àì夳堔傛蜴生んèń 2022-01-09 17:11 275阅读 0赞

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

  1. yum install libxml2-devel.x86_64

configure: error: Cannot find OpenSSL’s

  1. yum install openssl-devel.x86_64

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

  1. yum install pcre-devel.x86_64

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

  1. "--with-pcre-regex=/usr/include" \

configure: error: Could not find libpcre.(a|so) in /usr/include

  1. "--with-pcre-regex=/usr" \

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

  1. yum install curl-devel.x86_64

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

  1. yum install libjpeg-devel.x86_64

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

  1. yum install libpng-devel.x86_64

configure: error: freetype.h not found.

  1. yum install freetype-devel.x86_64

configure: error: Please reinstall the iconv library.

  1. "--with-iconv" \

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

  1. yum install libmcrypt.x86_64 libmcrypt-devel.x86_64

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

  1. yum install mhash.x86_64 mhash-devel.x86_64

Note that the MySQL client library is not bundled anymore!

  1. yum install php-mysql.x86_64 mysql-devel.x86_64

configure: error: Please reinstall the BZip2 distribution

  1. yum install bzip2-devel.x86_64

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

  1. yum install aspell-devel.x86_64

configure: error: Cannot find libtidy

  1. yum install libtidy.x86_64 libtidy-devel.x86_64

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

  1. yum install libxslt.x86_64 libxslt-devel.x86_64

collect2: ld returned 1 exit status

  1. yum install glibc-utils.x86_64 libtool-ltdl-devel.x86_64

Step by step to guide PHP Compile

Step 1: Update & Install Development Tools & Libraries

  1. yum update
  2. yum group install "Development Tools"
  3. yum group install "Development Libraries"

Step 2: Run the bellow bash script

  1. #!/bin/sh
  2. "./configure" \
  3. "--prefix=/usr/local/php5" \
  4. "--enable-force-cgi-redirect" \
  5. "--enable-fastcgi" \
  6. "--with-bz2" \
  7. "--with-config-file-path=/usr/local/etc" \
  8. "--with-config-file-scan-dir=/usr/local/etc/php.d" \
  9. "--with-curl=/usr/local/lib" \
  10. "--with-gd" \
  11. "--with-gettext" \
  12. "--with-jpeg-dir=/usr/local/lib" \
  13. "--with-freetype-dir=/usr/local/lib" \
  14. "--with-kerberos" \
  15. "--with-mcrypt" \
  16. "--with-mhash" \
  17. "--with-mime-magic" \
  18. "--with-mysql" \
  19. "--with-mysqli" \
  20. "--with-pcre-regex=/usr" \
  21. "--with-pdo-mysql=shared" \
  22. "--with-pdo-sqlite=shared" \
  23. "--with-pear=/usr/local/lib/php" \
  24. "--with-png-dir=/usr/local/lib" \
  25. "--with-pspell" \
  26. "--with-sqlite=shared" \
  27. "--with-tidy" \
  28. "--with-ttf" \
  29. "--with-xmlrpc" \
  30. "--with-xsl" \
  31. "--with-zlib" \
  32. "--with-zlib-dir=/usr/local/lib" \
  33. "--with-openssl" \
  34. "--with-iconv" \
  35. "--with-libdir=lib64" \
  36. "--enable-bcmath" \
  37. "--enable-calendar" \
  38. "--enable-exif" \
  39. "--enable-ftp" \
  40. "--enable-gd-native-ttf" \
  41. "--enable-libxml" \
  42. "--enable-magic-quotes" \
  43. "--enable-soap" \
  44. "--enable-sockets" \
  45. "--enable-mbstring" \
  46. "--enable-zip" \
  47. "--enable-wddx"

转载于:https://blog.51cto.com/304076020/1427410

发表评论

表情:
评论列表 (有 0 条评论,275人围观)

还没有评论,来说两句吧...

相关阅读