错误: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

以上错误都是在整个编译安装遇到的问题,然后结合网上的资料,找到的解决方法,总结到这个地方,希望能帮到大家!

php源代码安装常见错误与解决办法分享的更多相关文章

  1. github常见操作和常见错误及其解决办法

    一.常见操作 1. 使用git在本地创建一个项目的过程 $ makdir ~/hello-world //创建一个项目hello-world $ cd ~/hello-world //打开这个项目 $ ...

  2. Docker Hadoop 配置常见错误及解决办法

    Docker Hadoop 配置常见错误及解决办法 问题1:wordcount运行卡住,hadoop 任务运行到running job就卡住了 INFO mapreduce.Job: Running ...

  3. MVC MVC常见错误及解决办法

    MVC常见错误及解决办法 问题1: 必须添加对程序集“EntityFramework, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b77a5c5 ...

  4. Ubuntu下Linux配置内核各种常见错误和解决办法

    镜像下载.域名解析.时间同步请点击阿里云开源镜像站 这篇把Ubuntu下Linux配置内核各种常见错误和解决办法给大家讲解一下,希望可以帮助到大家. 一.Ubuntu系统中缺少各种依赖包导致的问题 1 ...

  5. 使用wubi安装ubuntu14.04出现的常见错误的解决办法

    花了一天的时间终于安装上了Ubuntu14.04,过程坎坷,是血泪史,开始报“cannot download the metalink and therefore the ISO”错误,解决后,又报“ ...

  6. Oracle的常见错误及解决办法

    ORA-12528: TNS:listener: all appropriate instances are blocking new connections ORA-12528问题是因为监听中的服务 ...

  7. windows下安装sass,以及常见错误和解决办法

    简介: sass依赖于ruby环境,安装sass之前得先装ruby. 1.安装ruby 1.1.下载地址:http://rubyinstaller.org/downloads 1.2.注意事项:安装时 ...

  8. MySQL常见错误及其解决办法

    1.连接类 (1).问题:MySQL server has gone away  解决办法:出现该报错常见的原因是服务器超时了并且关闭了连接.缺省地,如果没有事情发生,服务器在 8个小时后关闭连接.如 ...

  9. linux下QT Creator常见错误及解决办法

    最近因为在做一个关于linux下计算机取证的小项目,需要写一个图形界面,所以想到了用QT来写,选用了linux下的集成开发环境QT Creator5.5.1,但刚刚安装好,竟然连一个"hel ...

随机推荐

  1. Linux安装Oracle 11G过程(测试未写完)

    一.简介 Oracle数据库在系统运维中的重要性不言而喻,通过熟悉Oracle的安装来加深对操作系统和数据库知识的了解.Linux安装Oracle前期修改linux内核参数很重要,其实就是linux下 ...

  2. 给jdk写注释系列之jdk1.6容器(9)-Strategy设计模式之Comparable&Comparator接口

    前面我们说TreeMap和TreeSet都是有顺序的集合,而顺序的维持是要靠一个比较器Comparator或者map的key实现Comparable接口.      既然说到排序,首先我们不用去关心什 ...

  3. javaweb学习总结二十(http响应)

    一:http响应 1:http响应的组成部分 状态行.响应头.空行.响应数据 2:状态行 常用状态码: 200:请求成功 302:请求路径已经转移,请访问别的地址 307或者304: 请访问缓存信息 ...

  4. [转]WIN7服务一些优化方法

    本文转自:http://bbs.cfanclub.net/thread-391985-1-1.html Win7的服务,手动的一般不用管他,有些自动启动的,但对于有些用户来说是完全没用的,可以考虑禁用 ...

  5. 转:android git开源项目列表

    1. 知乎的合集说明 https://www.zhihu.com/question/19804692 2. http://p.codekk.com/

  6. SQL<>0查询不到NUll的值

    这几天遇到这样一个问题,sql中写<>0,刚好某个记录是NULL,道理上是满足<>0的啊,可是就是抽不出来,关于这个问题,到处找了点资料,算是这里 写一个总结出来. 用java ...

  7. HTTP 错误 500.21 - Internal Server Error 处理程序“PageHandlerFactory-Integr

    将网站发布到IIS,访问发生如下错误: HTTP 错误 500.21 - Internal Server Error处理程序"PageHandlerFactory-Integr"在 ...

  8. crackme_zapline分析

    [破文标题]crackme_zapline 分析 [破文作者]CloAk [作者邮箱]@qq.com [作者主页] [破解工具]OD,... [破解平台]Windows --------------- ...

  9. zz 李治国:地图大战本质是争抢O2O入口

    导航免费,这一天早该到来了!高德.百度免费之争,其实也是为了抢占生活服务这一最关键的入口,从而获得该战场的翻盘机会. 导航地图免费,实则是生活服务的入口之争.我在08年时就在阿里内部讲过这个事,并建议 ...

  10. Poj 2583 Series Determination

    1.Link: http://poj.org/problem?id=2583 2.Content: Series Determination Time Limit: 1000MS   Memory L ...