php编译二进制,二进制免编译安装php之缺少包整理

1、php安装的时有两种方式:

(1):php作为apapche的模块形式存在,需要用apxs指定apapche位置,并且用apxs来自动的加载模块;需要结合apapche使用(处理动态请求);

(2):php作为一个独立的服务单独运行,不需要指定其路径;

而两者的编译参数时不一样的;

php作为模块的形式的编译参数如下:

./configure --prefix=/usr/local/php --with-apxs2=/usr/local/apache2.4/bin/apxs --with-config-file-path=/usr/local/php/etc  --with-mysql=/usr/local/mysql --with-pdo-mysql=/usr/local/mysql --with-mysqli=/usr/local/mysql/bin/mysql_config --with-libxml-dir --with-gd --with-jpeg-dir --with-png-dir --with-freetype-dir --with-iconv-dir --with-zlib-dir --with-bz2 --with-openssl --with-mcrypt --enable-soap --enable-gd-native-ttf --enable-mbstring --enable-sockets --enable-exif

错误信息:

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

yum install -y libxml2-devel

configure: error: Cannot find OpenSSL's

yum   install -y  openssl  openssl-devel

checking for BZip2 in default path... not found

configure: error: Please reinstall the BZip2 distribution

yum  install -y bzip2  bzip2d-devel

configure: error: jpeglib.h not found.

yum install -y  libjpeg-devel

configure: error: png.h not found.

yum install -y  libpng  libpng-devel

configure: error: freetype-config not found.

yum install -y  freetype  freetype-devel

configure: error: mcrypt.h not found. Please reinstall libmcrypt.

yum install -y epel-release

yum install -y libmcrypt-devel

汇总后如下:基本全了;

yum  install  -y   libxml2-devel     openssl    openssl-devel   bzip2  bzip2d-devel     libjpeg-devel     libpng  libpng-devel   freetype  freetype-devel   epel-release    libmcrypt-devel

3、php作为服务单独运行的编译参数如下:

./configure --prefix=/usr/local/php-fpm --with-config-file-path=/usr/local/php-fpm/etc --enable-fpm --with-fpm-user=php-fpm --with-fpm-group=php-fpm --with-mysql=/usr/local/mysql --with-mysqli=/usr/local/mysql/bin/mysql_config --with-pdo-mysql=/usr/local/mysql --with-mysql-sock=/tmp/mysql.sock --with-libxml-dir --with-gd --with-jpeg-dir --with-png-dir --with-freetype-dir --with-iconv-dir --with-zlib-dir --with-mcrypt --enable-soap --enable-gd-native-ttf --enable-ftp --enable-mbstring --enable-exif --with-pear --with-curl --with-openssl

报错信息如下:

configure: error: in `/usr/local/src/php-5.6.30':

configure: error: no acceptable C compiler found in $PATH

See `config.log' for more details

安装: yum   install  -y   gcc

checking libxml2 install dir... yes

checking for xml2-config path...

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

安装: yum install -y libxml2-devel

configure: error: Cannot find OpenSSL's

安装: yum   install -y   openssl   openssl-devel

configure: error: Please reinstall the libcurl distribution -

easy.h should be in /include/curl/

安装:  yum install -y libcurl-devel

configure: error: jpeglib.h not found.

安装:yum  install  -y  libjpeg-devel

configure: error: png.h not found.

安装:yum   install -y   libpng   libpng-devel

configure: error: freetype-config not found.

安装:yum   install  -y freetype   freetype-devel

configure: error: mcrypt.h not found. Please reinstall libmcrypt.

安装:yum  install -y  epel-relese

yum   install -y  libmcrypt-devel

汇总后如下: yum   install   -y    gcc  libxml2-devel    openssl   openssl-devel   libcurl-devel    libjpeg-devel    libpng   libpng-devel    freetype   freetype-devel     epel-relese     libmcrypt-devel

如上;

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值