Trong quá trình quản lý và sử dụng VPS Linux thì các thao tác đối với PHP là khá nhạy cảm, và hay phát sinh sự cố trong quá trình thực thi các dịch vụ trên máy chủ. Và bài viết này BKNS đề cập đến một số lỗi PHP thường gặp nhất trong quá trình xử lý PHP trên máy chủ, BKNS sẽ ví dụ trên hệ điều hành CentOS 7 nhé.
checking for BZip2 support… yeschecking for BZip2 in default path… not foundconfigure: error: Please reinstall the BZip2 distribution
Fix
1 |
yum install bzip2-devel |
checking for cURL support… yeschecking if we should use cURL for url streams… nochecking for cURL in default path… not foundconfigure: error: Please reinstall the libcurl distribution -easy.h should be in /include/curl/
Fix
1 |
yum install curl-devel |
checking for fabsf… yeschecking for floorf… yesconfigure: error: jpeglib.h not found.
checking for fabsf… yeschecking for floorf… yeschecking for jpeg_read_header in -ljpeg… yesconfigure: error: png.h not found.
1 |
yum install libpng-devel |
checking for curl_multi_strerror in -lcurl… yeschecking for QDBM support… nochecking for GDBM support… nochecking for NDBM support… noconfigure: error: DBA: Could not find necessary header file(s).
1 |
yum install db4-devel |
checking for png_write_image in -lpng… yesIf configure fails try –with-xpm-dir=
configure: error: freetype.h not found.
1 |
Fix: Reconfigure your PHP with the following option.–with-xpm-dir=/usr |
checking for png_write_image in -lpng… yesconfigure: error: libXpm.(a|so) not found.
1 |
yum install libXpm-devel |
checking for bind_textdomain_codeset in -lc… yeschecking for GNU MP support… yesconfigure: error: Unable to locate gmp.h
1 |
yum install gmp-devel |
checking for utf8_mime2text signature… newchecking for U8T_DECOMPOSE…configure: error: utf8_mime2text() has new signature, but U8T_CANONICAL is missing. This should not happen. Check config.log for additional information.
1 |
yum install libc-client-devel |
checking for LDAP support… yes, sharedchecking for LDAP Cyrus SASL support… yesconfigure: error: Cannot find ldap.h
1 |
yum install openldap-devel |
checking for mysql_set_character_set in -lmysqlclient… yeschecking for mysql_stmt_next_result in -lmysqlclient… nochecking for Oracle Database OCI8 support… nochecking for unixODBC support… configure: error: ODBC header file ‘/usr/include/sqlext.h’ not found!
1 |
yum install unixODBC-devel |
checking for PostgreSQL support for PDO… yes, sharedchecking for pg_config… not foundconfigure: error: Cannot find libpq-fe.h. Please specify correct PostgreSQL installation path
1 |
yum install postgresql-devel |
checking for sqlite 3 support for PDO… yes, sharedchecking for PDO includes… (cached) /usr/local/src/php-5.3.7/extchecking for sqlite3 files in default path… not foundconfigure: error: Please reinstall the sqlite3 distribution
1 |
yum install sqlite-devel |
checking for utsname.domainname… yeschecking for PSPELL support… yesconfigure: error: Cannot find pspell
1 |
yum install aspell-devel |
checking whether to enable UCD SNMP hack… yeschecking for default_store.h… no
checking for kstat_read in -lkstat… nochecking for snmp_parse_oid in -lsnmp… nochecking for init_snmp in -lsnmp… noconfigure: error: SNMP sanity check failed. Please check config.log for more information.
1 |
yum install net-snmp-devel |
checking whether to enable XMLWriter support… yes, sharedchecking for xml2-config path… (cached) /usr/bin/xml2-configchecking whether libxml build works… (cached) yeschecking for XSL support… yes, sharedconfigure: error: xslt-config not found. Please reinstall the libxslt >= 1.1.0 distribution
1 |
yum install libxslt-devel |
configure: error: xml2-config not found. Please check your libxml2 installation.
1 |
yum install libxml2-devel |
checking for PCRE headers location… configure: error: Could not find pcre.h in /usr
1 |
yum install pcre-devel |
libtool: link: cannot find the library /usr/lib/libidn.la’ or unhandled argument
/usr/lib/libidn.la’make: *** [sapi/cgi/php-cgi] Error 1
1 |
cd /usr/src/wget http://ftp.gnu.org/gnu/libidn/libidn-1.26.tar.gztar -zvxf libidn-1.26.tar.gzcd libidn-1.26./configuremakemake installln -s /usr/local/lib/libidn.la /usr/lib/libidn.la |
libtool: link: `/usr/lib/libxml2.la’ is not a valid libtool archivemake: *** [ext/xsl/xsl.la] Error 1
1 |
cd /usr/src/wget ftp://xmlsoft.org/libxml2/libxml2-2.7.3.tar.gztar -zvxf libxml2-2.7.3.tar.gzcd libxml2-2.7.3./configure –prefix=/usrmakemake install |
configure: error: Your t1lib distribution is not installed correctly. Please reinstall it.
1 |
yum install t1lib-devel.x86_64 |
configure: error: mcrypt.h not found. Please reinstall libmcrypt.
1 |
yum install libmcrypt-devel.x86_64 |
configure: error: Cannot find libtidy
Fix
1 |
yum install libtidy libtidy-devel |