編譯php5.6

來源:互聯網
上載者:User

標籤:style   blog   http   color   io   os   ar   sp   div   

沒想到編譯個LAMP這麼麻煩又簡單。

按照官網的做就可以了,只是我在CentOs下一直會提示出現這個錯誤

按照官網的安裝方法:install

用下面的參數:

./configure --with-apxs2=/usr/local/httpd/bin/apxs --with-mysql --prefix=/usr/local/php5.6 --with-iconv-dir=/usr/local/lib

總是提示下面這個錯誤:

/php-5.6.0/ext/iconv/iconv.c:2512: more undefined references to `libiconv‘ 

缺少libiconv,真奇怪,不是有麼。

去安裝libiconv就行了

wget http://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.13.tar.gzwget http://www2d.biglobe.ne.jp/~msyk/software/libiconv/libiconv-1.13-ja-1.patch.gztar zxvf libiconv-1.13.tar.gzcd ./libiconv-1.13.tar.gzgzip -dc ../libiconv-1.13-ja-1.patch.gz | patch -p1makemake installln -s /usr/local/lib/libiconv.so.2.5.0 /usr/local/lib64/libiconv.soln -s /usr/local/lib/libiconv.so.2.5.0 /usr/local/lib64/libiconv.so.2

依次執行後用下面的這個參數配置安裝資訊:

./configure --with-apxs2=/usr/local/httpd/bin/apxs --with-mysql --prefix=/usr/local/php5.6 --with-iconv=shared,/usr/local

就可以了,記得make之前,要 make clean

 

後來我加了一些常用的參數(選項分先後)

./configure --with-apxs2=/usr/local/httpd/bin/apxs --prefix=/usr/local/php5.6 --with-iconv=shared,/usr/local --enable-bcmath --with-bz2 --enable-calendar --with-curl --enable-dba --enable-exif --enable-ftp --enable-inline-optimization --with-kerberos --enable-mbregex --enable-mbstring --with-mcrypt --with-mhash --with-mysql --with-mysqli --with-mysql-sock=/var/lib/mysql/mysql.sock --with-pdo-mysql --with-pear --enable-soap --enable-sockets --enable-wddx --with-xsl --enable-zip --with-zlib

編譯php5.6

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在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.