安装php时,make步骤报错make: *** [ext/gd/gd.lo] Error 1
生活随笔
收集整理的這篇文章主要介紹了
安装php时,make步骤报错make: *** [ext/gd/gd.lo] Error 1
小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.
安裝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 經(jīng)網(wǎng)上一查,如果系統(tǒng)是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
現(xiàn)在在來編譯php試試 make make install 已經(jīng)成功編譯安裝。
/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 經(jīng)網(wǎng)上一查,如果系統(tǒng)是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
現(xiàn)在在來編譯php試試 make make install 已經(jīng)成功編譯安裝。
總結
以上是生活随笔為你收集整理的安装php时,make步骤报错make: *** [ext/gd/gd.lo] Error 1的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 时间序列数据库的秘密(3)——加载和分布
- 下一篇: How to change in the