ubuntu 16 64位编译安装php

./configure \
--prefix=/usr/local/php7 \
--exec-prefix=/usr/local/php7 \
--with-config-file-path=/usr/local/php7/etc \
 --with-curl \
 --with-freetype-dir \
 --with-gd \
 --with-gettext \
 --with-iconv-dir \
 --with-kerberos \
 --with-libdir=lib64 \
 --with-libxml-dir \
 --with-mysqli \
 --with-openssl \
 --with-pcre-regex \
 --with-pdo-mysql \
 --with-pdo-sqlite \
 --with-pear \
 --with-png-dir \
 --with-xmlrpc \
 --with-xsl \
 --with-zlib \
--with-zlib-dir \
--with-mhash \
--with-mcrypt \
--with-openssl-dir \
--with-jpeg-dir \
--enable-gd-jis-conv \
 --enable-fpm \
 --enable-bcmath \
 --enable-libxml \
 --enable-inline-optimization \
 --enable-gd-native-ttf \
 --enable-mbregex \
 --enable-mbstring \
 --enable-opcache \
 --enable-pcntl \
 --enable-shmop \
 --enable-soap \
 --enable-sockets \
 --enable-sysvsem \
 --enable-xml \
 --enable-zip
首先 configure 确定编译环境

如出现一下错误::::::

错误1:

编译安装php7 报错 configure: error: Cannot find OpenSSL's libraries

 

1)解决步骤:

 

参考:http://linuxzj.blog.51cto.com/6160158/1632132  

 

        root@test2:~/PHP-5.3.27# find / -name libssl.so

      输出结果为: /usr/lib/x86_64-Linux-gnu/libssl.so

 

   初步判断它可能只会在 /usr/lib/ 下寻找 libssl.so 文件,于是:

    ln -s /usr/lib/x86_64-linux-gnu/libssl.so  /usr/lib

       重新编译安装即通过。

 

还是报同样的错误。

 

2)解决步骤2

参考:https://stackoverflow.com/questions/40359817/litespeed-web-server-and-error-cannot-find-openssls-libraries

 

 

apt-get install build-essential libexpat1-dev libgeoip-dev libpng-dev libpcre3-dev libssl-dev libxml2-dev rcs zlib1g-dev libmcrypt-dev libcurl4-openssl-dev libjpeg-dev libpng-dev libwebp-dev pkg-config

 

错误2:

./configure的时候出现如下错误:

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

 

解决方法:

apt install libxslt-devel* -y

 

与nginx 配置 :http://blog.csdn.net/whatday/article/details/50645117

转载于:https://www.cnblogs.com/whm-blog/p/7107975.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值