错误:configure: error: freetype-config not found.

解决:yum install freetype-devel

错误:configure: error: libevent >= 1.4.11 could not be found

解决:yum -y install libevent libevent-devel

错误:configure: error: Please reinstall the mysql distributio

解决:yum -y install mysql-devel

错误:make: *** [sapi/fpm/php-fpm] error 1

解决:用make ZEND_EXTRA_LIBS='-liconv'编译

错误:configure: error: XML configuration could not be found

解决:yum -y install libxml2 libxml2-devel

错误:configure: error: No curses/termcap library found

解决:yum -y install ncurses ncurses-devel

错误:configure: error: xml2-config not found

解决:yum -y install libxml2 libxml2-devel

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

解决:yum install openssl openssl-devel

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

解决:yum install curl curl-devel

错误:configure: error: Cannot find ldap.h

解决:yum install openldap openldap-devel

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

解决:yum install libjpeglibjpeg -devel

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

解决:yum install libpnglibpng –devel

错误:onfigure: error: freetype.h not found.

解决:yum install freetype-devel

错误:configure: error: cannot find output from lex; giving up

解决:yum -y install flex

错误:configure: error: mod_deflate has been requested but can not be built due to prerequisite failures

解决:yum -y install zlib-devel openssl-devel

错误:Configure: error: Unable to locate gmp.h

解决:yum install gmp-devel

错误:Configure: error: Cannot find MySQL header files under /usr.

Note that the MySQL client library is not bundled anymore!

解决:yum install mysql-devel

更多的补充内容:

安装php: ./configure 
configure: error: XML configuration could not be found

yum -y install libxml2 libxml2-devel

Cannot find OpenSSL's <evp.h> 
yum install openssl openssl-devel

1) Configure: error: xml2-config not found. Please check your libxml2 installation. 
#yum install libxml2 libxml2-devel (For RedHat & Fedora) 
# aptitude install libxml2-dev (For Ubuntu)

2) Checking for pkg-config… /usr/bin/pkg-config 
configure: error: Cannot find OpenSSL's <evp.h> 
#yum install openssl openssl-devel

3) Configure: error: Please reinstall the BZip2 distribution 
# yum install bzip2 bzip2-devel

4) Configure: error: Please reinstall the libcurl distribution - 
easy.h should be in <curl-dir>/include/curl/ 
# yum install curl curl-devel (For RedHat & Fedora) 
# install libcurl4-gnutls-dev (For Ubuntu)

5) Configure: error: libjpeg.(also) not found. 
# yum install libjpeg libjpeg-devel

6) Configure: error: libpng.(also) not found. 
# yum install libpng libpng-devel

7) Configure: error: freetype.h not found. 
#yum install freetype-devel

8) Configure: error: Unable to locate gmp.h 
# yum install gmp-devel

9) Configure: error: Cannot find MySQL header files under /usr. 
Note that the MySQL client library is not bundled anymore! 
# yum install mysql-devel (For RedHat & Fedora) 
# apt-get install libmysql++-dev (For Ubuntu)

10) Configure: error: Please reinstall the ncurses distribution 
# yum install ncurses ncurses-devel

11) Checking for unixODBC support… configure: error: ODBC header file ‘/usr/include/sqlext.h' not found! 
# yum install unixODBC-devel

12) Configure: error: Cannot find pspell 
# yum install pspell-devel

13) configure: error: mcrypt.h not found. Please reinstall libmcrypt. 
# yum install libmcrypt libmcrypt-devel (For RedHat & Fedora) 
# apt-get install libmcrypt-dev

14) Configure: error: snmp.h not found. Check your SNMP installation. 
# yum install net-snmp net-snmp-devel

15) 
/usr/bin/ld: cannot find -lltdl 
collect2: ld returned 1 exit status 
make: *** [sapi/cgi/php-cgi] Error 1 
# yum install libtool-ltdl.x86_64 libtool-ltdl-devel.x86_64

16) 
为php编译xcache模块的时候,需要运行phpize 
得到了一个错误 
#/usr/local/php/bin/phpize 
Configuring for: 
PHP Api Version: 20041225 
Zend Module Api No: 20060613 
Zend Extension Api No: 220060519 
Cannot find autoconf. Please check your autoconf installation and the $PHP_AUTOCONF 
environment variable is set correctly and then rerun this script. 
通过安装 autoconf 可以解决 
centos下执行 yum install autoconf 即可 
Ubuntu下执行 apt-get install autoconf 即可 
17) 
# /usr/local/php/bin/phpize 
Cannot find config.m4. 
Make sure that you run '/usr/local/php/bin/phpize' in the top level source directory of the module 
修改方法: 
[root@centos lnmp]# cd php-5.2.14ext/ 
[root@centos ext]# ./ext_skel --extname=my_module 
Creating directory my_module 
Creating basic files: config.m4 config.w32 .cvsignore my_module.c php_my_module.h CREDITS EXPERIMENTAL tests/001.phpt my_module.php [done]. 
To use your new extension, you will have to execute the following steps: 
1. $ cd .. 
2. $ vi ext/my_module/config.m4 
3. $ ./buildconf 
4. $ ./configure --[with|enable]-my_module 
5. $ make 
6. $ ./php -f ext/my_module/my_module.php 
7. $ vi ext/my_module/my_module.c 
8. $ make 
Repeat steps 3-6 until you are satisfied with ext/my_module/config.m4 and 
step 6 confirms that your module is compiled into PHP. Then, start writing 
code and repeat the last two steps as often as necessary. 
[root@centos ext]# cd my_module/ 
[root@centos my_module]# vim config.m4 
根据你自己的选择将 
dnl PHP_ARG_WITH(my_module, for my_module support, 
dnl Make sure that the comment is aligned: 
dnl [ --with-my_module Include my_module support]) 
修改成 
PHP_ARG_WITH(my_module, for my_module support, 
Make sure that the comment is aligned: 
[ --with-my_module Include my_module support]) 
或者将 
dnl PHP_ARG_ENABLE(my_module, whether to enable my_module support, 
dnl Make sure that the comment is aligned: 
dnl [ --enable-my_module Enable my_module support]) 
修改成 
PHP_ARG_ENABLE(my_module, whether to enable my_module support, 
Make sure that the comment is aligned: 
[ --enable-my_module Enable my_module support]) 
[root@centos my_module]# vim my_module.c 
  将文件其中的下列代码进行修改 
/* Every user visible function must have an entry in my_module_functions[]. 
*/ 
function_entry my_module_functions[] = { 
    PHP_FE(say_hello,    NULL) /* ?添加着一行代码 */ 
    PHP_FE(confirm_my_module_compiled,   NULL) /* For testing, remove later. */ 
    {NULL, NULL, NULL}   /* Must be the last line in my_module_functions[] */ 
}; 
  在文件的最后添加下列代码 
PHP_FUNCTION(say_hello) 
{ 
    zend_printf("hello sdomain!"); 
} 
再修改:php_sdomain.h 
vi php_sdomain.h 
在PHP_FUNCTION(confirm_my_module_compiled ); /* For testing, remove later. */ 这行的下面添加一行: 
PHP_FUNCTION(say_hello); /* For testing, remove later. */ 
  保存文件退出 
  然后我们就可以在这个目录下使用上面的命令了 
  /usr/local/php/bin/phpize 
  执行以后会看到下面的 
  [root@ns sdomain]# /usr/local/php/bin/phpize 
  Configuring for: 
  PHP Api Version:     20020918 
  Zend Module Api No:   20020429 
  Zend Extension Api No:  20050606 
  [root@ns sdomain]# 
  然后执行./configure --with-php-config=/usr/local/php/bin/php-config 
  然后执行make 
  make install 
然后他会把对应的so文件生成放到PHP安装目录下面的一个文件夹,并提示在在什么地方,然后再把里面的SO文件拷到你存放SO文件的地方 
  即你在php.ini里面的extension_dir所指定的位置 
  最后一步是你在php.ini文件中打开这个扩展 
  extension=sdomain.so 
  然后 
  重新起动apache

文章来自http://www.cnblogs.com/mityaya/p/4436525.html

PHP源码安装经常会碰到的问题及解决办法的更多相关文章

  1. spring源码解析(一) 环境搭建(各种坑的解决办法)

    上次搭建spring源码的环境还是两年前,依稀记得那时候也是一顿折腾,奈何当时没有记录,导致两年后的今天把坑重踩了一遍,还遇到了新的坑,真是欲哭无泪;为了以后类似的事情不再发生,这次写下这篇博文来必坑 ...

  2. Andriod下载源码导入后AndroidManifest.xml小红叉的解决办法

    问题描述: 下载源码后,用eclipse导入,AndroidManifest.xml小红叉,而且AndroidManifest.xml打不开无法编译,请高人指点! 解决办法: 网上下载的工程文件夹不要 ...

  3. 源码安装extundelete以及对遇到问题的解决

    软件下载:http://sourceforge.net/projects/extundelete/ 1.在安装extundelete包./configure时遇到configure: error: C ...

  4. TensorFlow源码安装

    前言 TensorFlow如果能二进制包安装,我真的不想选择自己编译,但是情况不由人,好不容易找到一台服务器,CPU不支持AVX指令集,安装的release版本运行到import tensorflow ...

  5. mac/Linux源码安装TensorFlow

    因为用pip命令直接下载安装会链接到google,导致打不开,比如使用pip install tensorflow碰到如下的问题.因此在本文中,主要介绍了如何通过源码进行TensorFlow的安装 $ ...

  6. Subversion1.8源码安装流程

    为了解决svnamin:Unrecognized record type in stream的问题,决定将Subversion1.7升级为Subversion1.8 Subversion1.8的源码安 ...

  7. mysql 5.7.18 源码安装笔记

    之所以贴出这样一篇笔记呢?主要是因为很久之前,源码安装MySQL的时候,碰到了太多太多的坎坷. 如果你有兴趣进行源码安装,那么请不要以这篇文章为标准,因为每个人的及其环境等其他因素还是差距比较大的. ...

  8. mono-3.4.0 源码安装时出现的问题 [do-install] Error 2 [install-pcl-targets] Error 1 解决方法

    Mono 3.4修复了很多bug,继续加强稳定性和性能(其实Mono 3.2.8 已经很稳定,性能也很好了),但是从http://download.mono-project.com/sources/m ...

  9. 搭建LNAMP环境(七)- PHP7源码安装Memcached和Memcache拓展

    上一篇:搭建LNAMP环境(六)- PHP7源码安装MongoDB和MongoDB拓展 一.安装Memcached 1.yum安装libevent事件触发管理器 yum -y install libe ...

随机推荐

  1. es6基础(2)--解构赋值

    //解构赋值 { let a,b,rest; [a,b]=[1,2]; console.log(a,b); } //数组解构赋值 { let a,b,rest; [a,b,...rest]=[1,2, ...

  2. fiddler--配置火狐代理配置代理

    fiddler安装 下载fiddler最新版: 默认安装: 配置火狐代理配置代理 打开fiddler 按图操作,复制选中的链接:fiddler -> tool ->connections ...

  3. PowerDesigner 物理数据模型(PDM) 说明

    ref: https://blog.csdn.net/tianlesoftware/article/details/6874067 一.     PDM 介绍 物理数据模型(Physical Data ...

  4. ROS学习手记 - 7 创建ROS msg & srv

    至此,我们初步学习了ROS的基本工具,接下来一步步理解ROS的各个工作部件的创建和工作原理. 本文的详细文档:http://wenku.baidu.com/view/623f41b3376baf1ff ...

  5. scala-class

    object Scala { def main( args : Array[ String ] ) : Unit = { val p = , ); println( p ); p.move( , ); ...

  6. SAPCertifiedTechnologyAssociate-SystemAdministration(SAPHANAasaDatabase)

    C_TADM55_75 SAP Certified Technology Associate - System Administration (SAP HANA as a Database) with ...

  7. kvm云主机使用宿主机usb设备

    有些时候KVM客户机还是要使用USB设备,比如USB密钥等 KVM命令行参数 -usb 打开usb驱动程序,启动客户机usb支持-usbdevice devname 为客户机增加usb设备,devna ...

  8. 代码:jquery小效果—— 吸顶

    吸顶: 可以防止滚屏过程中,代码被多次调用 <script src="http://cdn.bootcss.com/jquery/1.11.1/jquery.min.js"& ...

  9. githup创建新java项目

    1.在githup中创建仓库 2.import创建的地址到本地文件d:/mygit 3.在d:/mygit中创建eclipse项目 3.在eclipse中team-->push to branc ...

  10. pycharm使用技巧 + 调试程序-12

    Pycharm使用技巧 系出名门:JetBrains 集成开发环境:IDE 功能: Project视图.代码结构视图 代码导航 语法高亮.自动补齐.错误提示.自动修复 代码重构 主流开发框架的支持(D ...