ubuntu 16 64位編譯安裝php

來源:互聯網
上載者:User

標籤:figure   get   -name   conf   distrib   cxf   geoip   alt   pca   

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

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.