安裝php時,make步驟報錯make: *** [ext/gd/gd.lo] Error 1


安裝PHP時,make步驟報錯make: *** [ext/gd/gd.lo] Error 1

/usr/local/src/LAMP+memcahed+catci/php-5.4.0/ext/gd/gd_ctx.c: In function '_php_image_stream_putc':
/usr/local/src/LAMP+memcahed+catci/php-5.4.0/ext/gd/gd_ctx.c:51: error: 'struct gdIOCtx' has no member named 'data'
/usr/local/src/LAMP+memcahed+catci/php-5.4.0/ext/gd/gd_ctx.c: In function '_php_image_stream_putbuf':
/usr/local/src/LAMP+memcahed+catci/php-5.4.0/ext/gd/gd_ctx.c:58: error: 'struct gdIOCtx' has no member named 'data'
/usr/local/src/LAMP+memcahed+catci/php-5.4.0/ext/gd/gd_ctx.c: In function '_php_image_stream_ctxfree':
/usr/local/src/LAMP+memcahed+catci/php-5.4.0/ext/gd/gd_ctx.c:67: error: 'struct gdIOCtx' has no member named 'data'
/usr/local/src/LAMP+memcahed+catci/php-5.4.0/ext/gd/gd_ctx.c:68: error: 'struct gdIOCtx' has no member named 'data'
/usr/local/src/LAMP+memcahed+catci/php-5.4.0/ext/gd/gd_ctx.c:69: error: 'struct gdIOCtx' has no member named 'data'
In file included from /usr/local/src/LAMP+memcahed+catci/php-5.4.0/ext/gd/gd.c:103:
/usr/local/src/LAMP+memcahed+catci/php-5.4.0/ext/gd/gd_ctx.c: In function '_php_image_output_ctx':
/usr/local/src/LAMP+memcahed+catci/php-5.4.0/ext/gd/gd_ctx.c:153: error: 'gdIOCtx' has no member named 'data'
make: *** [ext/gd/gd.lo] Error 1
 
這個問題好像是處在GD上,先試着不指定GD的路徑
 
./configure --prefix=/usr/php \
--with-gd --with-apxs2=/usr/apache/bin/apxs \
--enable-mbregex --enable-bcmath \
--with-mysql=/usr/mysql --with-zlib-dir=/usr/zlib \
--enable-mbstring=all --with-pdo-mysql \
--with-mysql-sock=/var/mysql --with-freetype-dir=/usr/freetype
 
make
這下雖然沒有上邊那個錯誤,但是新的錯誤又來了。
 
could not read symbols: Bad value
經網上一查,如果系統是64位,需要用64位元的方法重新編譯安裝zlib:
[root@serv-169 usr]# CFLAGS="-O3 -fPIC" ./configure --prefix=/usr/zlib
 
[root@serv-169 usr]# make
 
[root@serv-169 usr]# make install
 
[root@serv-169 usr]# make clean

現在在來編譯php試試
make
make install
已經成功編譯安裝。
 
 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM