请选择 进入手机版 | 继续访问电脑版

无忧编程_ASP.NET  / C# / PHP 程序员的软件世界

 找回密码
 立即注册

QQ登录

只需一步,快速开始

查看: 174|回复: 1

php源码编译常见错误解决方法

[复制链接]

259

主题

286

帖子

1159

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
1159
发表于 2017-9-7 10:42:12 | 显示全部楼层 |阅读模式
php源码编译常见错误解决方法
在CentOS编译PHP5的时候有时会遇到以下的一些错误信息,基本上都可以通过yum安装相应的库来解决。以下是具体的一些解决办法:
checking for BZip2 support… yes checking for BZip2 in default path… not found configure: error: Please reinstall the BZip2 distribution
Fix: yum install bzip2-devel
checking for cURL support… yes checking if we should use cURL for url streams… no checking for cURL in default path… not found configure: error: Please reinstall the libcurl distribution – easy.h should be in/include/curl/
Fix: yum install curl-devel

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: yum install db4-devel
checking for fabsf… yes checking for floorf… yes configure: error: jpeglib.h not found.
Fix: yum install libjpeg-devel
checking for fabsf… yes checking for floorf… yes checking for jpeg_read_header in -ljpeg… yes configure: error: png.h not found.
Fix: yum install libpng-devel
checking for png_write_image in -lpng… yes If configure fails try –with-xpm-dir=

configure: error: freetype.h not found.
Fix: Reconfigure your PHP with the following option. --with-xpm-dir=/usr
checking for png_write_image in -lpng… yes configure: error: libXpm.(a|so) not found.
Fix: yum install libXpm-devel
checking for bind_textdomain_codeset in -lc… yes checking for GNU MP support… yes configure: error: Unable to locate gmp.h
Fix: yum install gmp-devel
checking for utf8_mime2text signature… new checking 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.
Fix: yum install libc-client-devel
checking for LDAP support… yes, shared checking for LDAP Cyrus SASL support… yes configure: error: Cannot find ldap.h
Fix: yum install openldap-devel
checking for mysql_set_character_set in -lmysqlclient… yes checking for mysql_stmt_next_result in -lmysqlclient… no checking for Oracle Database OCI8 support… no checking for unixODBC support… configure: error: ODBC header file ‘/usr/include/sqlext.h’ not found!
Fix:
yum install unixODBC-devel
checking for PostgreSQL support for PDO… yes, shared checking for pg_config… not found configure: error: Cannot find libpq-fe.h. Please specify correct PostgreSQL installation path
Fix: yum install postgresql-devel
checking for sqlite 3 support for PDO… yes, shared checking for PDO includes… (cached) /usr/local/src/php-5.3.7/ext checking for sqlite3 files in default path… not found configure: error: Please reinstall the sqlite3 distribution
Fix: yum install sqlite-devel
checking for utsname.domainname… yes checking for PSPELL support… yes configure: error: Cannot find pspell
Fix: yum install aspell-devel
checking whether to enable UCD SNMP hack… yes checking for default_store.h… no
checking for kstat_read in -lkstat… no checking for snmp_parse_oid in -lsnmp… no checking for init_snmp in -lsnmp… no configure: error: SNMP sanity check failed. Please check config.log for more information.
Fix: yum install net-snmp-devel
checking whether to enable XMLWriter support… yes, shared checking for xml2-config path… (cached) /usr/bin/xml2-config checking whether libxml build works… (cached) yes checking for XSL support… yes, shared configure: error: xslt-config not found. Please reinstall the libxslt >= 1.1.0 distribution
Fix: yum install libxslt-devel
configure: error: xml2-config not found. Please check your libxml2 installation.
Fix: yum install libxml2-devel
checking for PCRE headers location… configure: error: Could not find pcre.h in /usr
Fix: yum install pcre-devel
configure: error: Cannot find MySQL header files under yes. Note that the MySQL client library is not bundled anymore!
Fix: yum install mysql-devel
checking for unixODBC support… configure: error: ODBC header file ‘/usr/include/sqlext.h’ not found!
Fix: yum install unixODBC-devel
checking for pg_config… not found configure: error: Cannot find libpq-fe.h. Please specify correct PostgreSQL installation path
Fix:
yum install postgresql-devel
configure: error: Cannot find pspell
Fix: yum install pspell-devel
configure: error: Could not find net-snmp-config binary. Please check your net-snmp installation.
Fix: yum install net-snmp-devel
configure: error: xslt-config not found. Please reinstall the libxslt >= 1.1.0 distribution
Fix: yum install libxslt-devel

windows .net(C#+MSSQL) linux(php+mysql)  
回复

使用道具 举报

259

主题

286

帖子

1159

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
1159
 楼主| 发表于 2017-9-7 11:03:01 | 显示全部楼层

PHP编译时有许多依赖,如果当前系统没有安装就会报错,本文收集了一些常见的报错,以及解决方案供大家参考。

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

yum install libxml2-devel -y

configure: error: Cannot find OpenSSL's <evp.h>

yum install openssl-devel -y

checking for PCRE headers location... configure: error: Could not find pcre.h in /usr

yum install pcre-devel -y

configure: error: Please reinstall the BZip2 distribution

yum install bzip2-devel -y

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

yum install libcurl-devel -y

configure: error: DBA: Could not find necessary header file(s).

yum install db4-devel -y

configure: error: Cannot find enchant

yum install enchant-devel -y

configure: error: jpeglib.h not found.

yum install libjpeg-devel -y

configure: error: png.h not found.

yum install libpng-devel -y

configure: error: xpm.h not found.

yum install libXpm-devel -y

configure: error: freetype-config not found.

yum install freetype-devel -y

configure: error: Unable to locate gmp.h

yum install gmp-devel -y

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

yum install libc-client-devel -y

configure: error: Unable to detect ICU prefix or /usr/bin/icu-config failed. Please verify ICU install prefix and make sure icu-config works.

yum install libicu-devel -y

checking how to run the C++ preprocessor... /lib/cppconfigure: error: in `/root/php-5.5.38':configure: error: C++ preprocessor "/lib/cpp" fails sanity checkSee `config.log' for more details

yum install gcc-c++ -y

configure: error: Cannot find ldap.h

yum install openldap-devel -y

checking for specified location of the MySQL UNIX socket... noconfigure: error: Cannot find MySQL header files under /usr.Note that the MySQL client library is not bundled anymore!

yum install mysql-devel

checking for unixODBC support... configure: error: ODBC header file '/usr/include/sqlext.h' not found!

yum install unixODBC-devel -y

checking for pg_config... not foundconfigure: error: Cannot find libpq-fe.h. Please specify correct PostgreSQL installation path

yum install postgresql-devel

configure: error: Please reinstall the sqlite distribution from http://www.sqlite.org

yum install sqlite-devel

configure: error: Cannot find pspell

yum install aspell-devel

configure: error: Please reinstall libedit - I cannot find readline.h

yum install libedit-devel -y

configure: error: Can not find recode.h anywhere under /usr /usr/local /usr /opt.

yum install recode-devel -y

configure: error: Could not find net-snmp-config binary. Please check your net-snmp installation.

yum install net-snmp-devel

configure: error: Cannot find libtidy

yum install libtidy-devel -y

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

yum install libxslt-devel -y

windows .net(C#+MSSQL) linux(php+mysql)  
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|Archiver|手机版|小黑屋|软件编程 Inc.  

GMT+8, 2017-11-18 12:37 , Processed in 0.140332 second(s), 23 queries .

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表