1. 程式人生 > >ubuntu 16 64位編譯安裝php

ubuntu 16 64位編譯安裝php

ear 1.0 log bcmath question figure usr tle 解決

./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

[email protected]:~/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

ubuntu 16 64位編譯安裝php