php支持gd,png,jpeg,zlib
生活随笔
收集整理的這篇文章主要介紹了
php支持gd,png,jpeg,zlib
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
今天又進行了次pnp的安裝,發現php無法支持gd等庫,解決過程如下:
###安裝jpeg,以下幾個目錄需要創建,當編譯完成后,并不會自動創建,當然包括libjpeg.so也不會存在
mkdir -p /usr/local/jpeg6/bin
mkdir -p /usr/local/jpeg6/lib
mkdir -p /usr/local/jpeg6/include
mkdir -p /usr/local/jpeg6/man/man1 tar -zxvf libtool-1.5.22.tar.gz cd libtool-1.5.22 &&./configure && make && make install 然后進入jpeg的源碼目錄,一定要執行 # cp /usr/local/share/libtool/config.sub ./ # cp /usr/local/share/libtool/config.guess ./ # ./configure --prefix=/usr/local/jpeg6/ --enable-shared --enable-static? # make? # make install ##安裝libpng tar -jxvf libpng-1.2.40.tar.bz2 cp scripts/makefile.gcmmx makefile ./configure --prefix=/usr/local/libpng && make && make install (libpnp生成的安裝目錄并不是libpng,而是lib) tar -zxvf gd-2.0.33.tar.gz? ./configure --prefix=/usr/local/gd --with-png=/usr/local/lib --with-jpeg=/usr/local/jpeg6/ make && make install? cp gd.h /usr/local/lib ?--這一步很重要,不然后面會報錯 ? ldconfig -v ? 更新庫 php-5.3.5.tar.gz ./configure --prefix=/usr/local/php --with-apxs2=/usr/local/apache/bin/apxs --with-jpeg-dir=/usr/local/jpeg6/ --with-png-dir=/usr/local/lib --enable-sockets --with-gd --with-zlib --此處的with-gd后面不能加gd的安裝目錄,否則會報錯 編譯安裝php時出錯configure: error: build test failed. 參考文章: http://www.oschina.net/question/17_87 http://blog.yntv.cn/html/28/28-360.html轉載于:https://blog.51cto.com/inbank2012/1109044
總結
以上是生活随笔為你收集整理的php支持gd,png,jpeg,zlib的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: WPF - 图形设计器(Diagram
- 下一篇: linux 其他参数