1.装fontconfig ./configure –prefix=/usr/local/fontconfig –with-freetype-config=/usr/local/freetype/bin/freetype-config 时报错 解决:其实是由于我用的是64位机器的原因,解决办法也比较好办了。在configure后的选项中加上:LDFLAGS=”-L/usr/lib64 -L/lib64”

2.在安装php时,make报如下错误: 错误:‘struct gdIOCtx’ 没有名为 ‘data’ 的成员 解决:vi < gd_dir>/include/gd_io.h

gdIOCtx结构中增加void *data;

格式如下

typedef struct gdIOCtx

{

int (*getC) (struct gdIOCtx *);

int (*getBuf) (struct gdIOCtx *, void *, int);

void (*putC) (struct gdIOCtx *, int);

int (*putBuf) (struct gdIOCtx *, const void *, int);

/* seek must return 1 on SUCCESS, 0 on FAILURE. Unlike fseek! */

int (*seek) (struct gdIOCtx *, const int);

long (*tell) (struct gdIOCtx *);

void (*gd_free) (struct gdIOCtx *);

void (*data);

}

gdIOCtx;