升级安装GD
2008-02-15 18:19:10 来源:WEB开发网 闂傚倸鍊搁崐鎼佸磹閹间礁纾归柟闂寸绾惧綊鏌熼梻瀵割槮缁炬儳缍婇弻鐔兼⒒鐎靛壊妲紒鐐劤缂嶅﹪寮婚悢鍏尖拻閻庨潧澹婂Σ顔剧磼閻愵剙鍔ょ紓宥咃躬瀵鎮㈤崗灏栨嫽闁诲酣娼ф竟濠偽i鍓х<闁诡垎鍐f寖闂佺娅曢幑鍥灳閺冨牆绀冩い蹇庣娴滈箖鏌ㄥ┑鍡欏嚬缂併劎绮妵鍕箳鐎n亞浠鹃梺闈涙搐鐎氫即鐛崶顒夋晬婵絾瀵ч幑鍥蓟閻斿摜鐟归柛顭戝枛椤牆顪冮妶搴′簼缂侇喗鎸搁悾鐑藉础閻愬秵妫冮崺鈧い鎺戝瀹撲礁鈹戦悩鎻掝伀缁惧彞绮欓弻娑氫沪閹规劕顥濋梺閫炲苯澧伴柟铏崌閿濈偛鈹戠€n€晠鏌嶆潪鎷屽厡闁汇倕鎳愮槐鎾存媴閸撴彃鍓卞銈嗗灦閻熲晛鐣烽妷褉鍋撻敐搴℃灍闁绘挻娲橀妵鍕箛闂堟稐绨肩紓浣藉煐濮樸劎妲愰幘璇茬闁冲搫鍊婚ˇ鏉库攽椤旂》宸ユい顓炲槻閻g兘骞掗幋鏃€鐎婚梺瑙勬儗閸樺€熲叺婵犵數濮烽弫鍛婃叏椤撱垹纾婚柟鍓х帛閳锋垶銇勯幒鍡椾壕缂備礁顦遍弫濠氱嵁閸℃稒鍊烽柛婵嗗椤旀劕鈹戦悜鍥╃У闁告挻鐟︽穱濠囨嚃閳哄啰锛滈梺褰掑亰閸欏骸鈻撳⿰鍫熺厸閻忕偟纭堕崑鎾诲箛娴e憡鍊梺纭呭亹鐞涖儵鍩€椤掑啫鐨洪柡浣圭墪閳规垿鎮欓弶鎴犱桓闂佸湱枪閹芥粎鍒掗弮鍫熷仺缂佸顕抽敃鍌涚厱闁哄洢鍔岄悘鐘绘煕閹般劌浜惧┑锛勫亼閸婃牠宕濋敃鈧…鍧楀焵椤掍胶绠剧€光偓婵犱線鍋楀┑顔硷龚濞咃絿妲愰幒鎳崇喓鎷犻懠鑸垫毐闂傚倷鑳舵灙婵炲鍏樺顐ゆ嫚瀹割喖娈ㄦ繝鐢靛У绾板秹寮查幓鎺濈唵閻犺櫣灏ㄥ銉р偓瑙勬尭濡繂顫忛搹鍦<婵☆垰鎼~宥囩磽娴i鍔嶉柟绋垮暱閻g兘骞嬮敃鈧粻濠氭偣閸パ冪骇鐎规挸绉撮—鍐Χ閸℃ê闉嶇紓浣割儐閸ㄥ墎绮嬪澶嬪€锋い鎺嶇瀵灝鈹戦埥鍡楃仯闁告鍕洸濡わ絽鍟崐鍨叏濡厧浜鹃悗姘炬嫹

核心提示:好久没升级我服务器上的软件包,今天我对每个重要的软件都看了一下,发现GD和php都有了升级,事不宜迟马上升级gd的下载我没选择官方网站,因为官方的版本是不支持gif创建函数的,为什么会不支持呢?官方网站是这样解释的:When will you put GIF support back into gd?Many have
好久没升级我服务器上的软件包,今天我对每个重要的软件都看了一下,发现GD和php都有了升级,事不宜迟马上升级
gd的下载我没选择官方网站,因为官方的版本是不支持gif创建函数的,为什么会不支持呢?
官方网站是这样解释的:
When will you put GIF support back into gd?
Many have asked whether gd will support reading and creating GIF files again, since we have passed June 20th, 2003, when the well-known Unisys LZW patent expired in the US. Although this patent has expired in the United States, this patent does not expire for another year in the rest of the world. Since I have no way of limiting distribution of GIF-reading-and-creating code to US users only that is guaranteed to please somebody else's lawyer, I have opted to follow the same policy that the ImageMagick authors are following: GIF support will not reappear in gd until the patent expires world-wide on July 7th, 2004. I realize this situation is frustrating for many; please direct your anger and complaints toward the questionable patent system that allows the patenting of such straightforward algorithms in the first place. Thank you!
所以我从http://www.rime.com.au/gd/下载已经打了gif补丁的gd库.
wget http://downloads.rhyme.com.au/gd/gd-2.0.21gif_040120.tar.gz
tar zvxf gd-2.0.21gif_040120.tar.gz
cd gd-2.0.21gif
./configure --with-png=/usr --with-freetype=/usr --with-jpeg=/usr --with-xpm=/usr
make
make install
安装完毕,当然如果你用php的话,最好重新编译一下php,反正今天php今天也要升级到4.3.5.php的编译我就不多说了,不过php的官方好像说对gd的支持只到2.0.17,不知我这么高的版本是否支持的很好,反正不管了,升级.go go go
编译php的时候需要加哪些参数呢?
--with-freetype-dir=/usr --with-png-dir=/usr --with-gd=/usr/local --enable-gd-native-ttf --with-ttf --with-jpeg-dir=/usr --with-png
请问1.--with-freetype-dir=/usr --with-png-dir=/usr --with-gd=/usr/local
为什么不是 =/usr/lib 或者/usr/include 或者/usr/local/include 或/usr/local/lib呢?
2.--enable-gd-native-ttf --with-ttf
enable-gd-native-ttf是开启了什么功能呢?
--with-ttf 后为什么没有相应的 =/usr呢?
--with-freetype-dir是指它安装的路径,而不单单是lib路径或者include路径
--enable-gd-native-ttf GD: Enable TrueType string function.
更多精彩
赞助商链接