(转)ubuntu源码编译安装php常见错误解决办法

原文地址

http://blog.csdn.net/white__cat/article/details/28907535

‘./configure’ ‘–prefix=/usr/local/PHP’ ‘–with-config-file-path=/etc’ ‘–with-MySQL=/usr/local/mysql’ ‘–with-mysqli=/usr/local/mysql/bin/mysql_config’ ‘–with-iconv-dir=/usr/local’ ‘–with-freetype-dir’ ‘–with-jpeg-dir’ ‘–with-png-dir’ ‘–with-zlib’ ‘–with-libxml-dir=/usr’ ‘–enable-xml’ ‘–disable-rpath’ ‘–enable-safe-mode’ ‘–enable-bcmath’ ‘–enable-shmop’ ‘–enable-sysvsem’ ‘–enable-inline-optimization’ ‘–with-curl’ ‘–with-curlwrappers’ ‘–enable-mbregex’ ‘–enable-fpm’ ‘–enable-mbstring’ ‘–with-mcrypt’ ‘–with-gd’ ‘–enable-gd-native-ttf’ ‘–with-openssl’ ‘–with-mhash’ ‘–enable-pcntl’ ‘–enable-sockets’ ‘–with-xmlrpc’ ‘–enable-zip’ ‘–enable-soap’
出现得错误如下:
错误一:
configure: error: xml2-config not found. Please check your libxml2 installation.
而我已经安装过了libxml2,但是还是有这个提示:
解决办法:
# sudo apt-get install libxml2-dev

错误二:
configure: error: Please reinstall the BZip2 distribution
而我也已经安装了bzip2,网上找到得解决方案都是需要安装bzip2-dev,可是11.10里面没有这个库。
解决办法:在网上找到bzip2-1.0.5.tar.gz,解压,直接make ,sudo make install.(我使用的该源来自于http://ishare.iask.sina.com.cn/f/9769001.html)

错误三:
configure: error: Please reinstall the libcurl distribution -easy.h should be in /include/curl/
解决办法:
# sudo apt-get install libcurl4-gnutls-dev

错误四:
configure: error: jpeglib.h not found.
解决办法:
# sudo apt-get install libjpeg-dev

错误五:
configure: error: png.h not found.
解决办法:
# sudo apt-get install libpng-dev

错误六:
configure: error: libXpm.(a|so) not found.
解决办法:
# sudo apt-get install libxpm-dev

错误七:
configure: error: freetype.h not found.
解决办法:
# sudo apt-get install libfreetype6-dev

错误八:
configure: error: Your t1lib distribution is not installed correctly. Please reinstall it.
解决办法:
# sudo apt-get install libt1-dev

错误九:
configure: error: mcrypt.h not found. Please reinstall libmcrypt.
解决办法:
# sudo apt-get install libmcrypt-dev

错误十:
configure: error: Cannot find MySQL header files under yes.
Note that the MySQL client library is not bundled anymore!
解决办法:
# sudo apt-get install libmysql++-dev

错误十一:
configure: error: xslt-config not found. Please reinstall the libxslt >= 1.1.0 distribution
解决办法:
# sudo apt-get install libxslt1-dev
可见php源码安装之前需要先安装这些依赖,详细可见http://forum.ubuntu.org.cn/viewtopic.php?f=88&t=231159
如上错误都解决之后,再次./config….没有错误之后,
# make
# sudo make install

时间: 2024-10-27 07:20:22

(转)ubuntu源码编译安装php常见错误解决办法的相关文章

PHP编译安装时常见错误解决办法,php编译常见错误

PHP编译安装时常见错误解决办法,php编译常见错误 1.configure: error: xslt-config not found. Please reinstall the libxslt >= 1.1.0 distribution 解决方法: yum -y install libxslt-devel 2.configure: error: Could not find net-snmp-config binary. Please check your net-snmp installa

linux编译安装时常见错误解决办法

linux编译安装时常见错误解决办法 This article is post on https://coderwall.com/p/ggmpfa 原文链接:http://www.bkjia.com/PHPjc/1008013.html configure: error: xslt-config not found. Please reinstall the libxslt >= 1.1.0 distribution复制代码 代码如下:yum -y install libxslt-devel c

PHP编译安装时常见错误解决办法

This article is post on https://coderwall.com/p/ggmpfa configure: error: xslt-config not found. Please reinstall the libxslt >= 1.1.0 distribution 代码如下: yum -y install libxslt-devel configure: error: Could not find net-snmp-config binary. Please chec

Debian/Ubuntu源码编译安装PHP--支持FastCGI

从 php 5.3.3 起,就可直接使用 PHP-FPM ,不再需要打补丁了.此前已写过<Linux 从源码编译安装 PHP 5> 见 http://www.linuxidc.com/Linux/2011-10/45743.htm,但是以 mod_php 模块方式,而非 FastCGI 模式运行 php ,并不适用于 Lighttpd.Nginx.LiteSpeed ,而且当时对所有模块都采用编译安装也显得过于繁琐. 一.什么是 FastCGI.PHP-FPM.FastCGI ? CGI是一种

ubuntu 源码编译安装最新的vim 8.0

为什么要源码编译安装VIM? 因为我要安装ycm,ycm要求vim版本为8.0 教程步骤: 1, 核对系统版本 2, 删除系统自带的vim 3, 编译安装vim 4, 检验vim的安装 1,核对系统版本 [email protected]:~# lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 14.04.5 LTS Release: 14.04 Codename: tr

ubuntu 源码编译安装

下载xxx.tar 源码包,解压tar 包(tar -xzvf  xxx.tar.gz -C 解压目录默认当前): 检查有没有makefile文件,没有的话请进入解压后的文件夹运行automake(生产makefile 工具); 进入解压文件夹 ./configure ->make ->make install   (注意权限): 默认安装/usr/local/bin ,改变安装路径 ./configure --prefix=/opt/xxx

[转]编译Android源代码常见错误解决办法

1. 编译时出现/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.4.5/../../../libz.so when searching for -lz PLATFORM_VERSION_CODENAME=AOSPPLATFORM_VERSION=AOSPTARGET_PRODUCT=genericTARGET_BUILD_VARIANT=engTARGET_SIMULATOR=TARGET_BUILD_TYPE

源码编译安装LAMP环境及配置基于域名访问的多虚拟主机

实验环境及软件版本: CentOS版本: 6.6(2.6.32.-504.el6.x86_64) apache版本: apache2.2.27 mysql版本:  Mysql-5.6.23 php版本:    php-5.3.27 一.关闭防火墙:service iptables stop chkconfig iptables off 二.关闭selinux: sed -i 's/SELINUX=disabled/SELINUX=enforcing/g' /etc/selinux/config

Deepin 15.4/Ubuntu 14 源码编译安装 MySQL-5.6.35

在 Ubuntu 下,先前一直是 二进制包解压安装,详情参考: http://www.cnblogs.com/phpgo/p/5680906.html 现改为 源码编译安装: #!/bin/bash # 安装 依赖库 sudo apt-get -y install make cmake gcc g++ bison openssl libssl-dev libncurses5-dev # 创建 数据 文件夹 sudo mv /fiisoo/mysql /fiisoo/mysql.$(date "+