lamp环境编译出现的相关问题
2014-02-26 19:04
316 查看
1、php
编译、生成php都正常,在安装的时候出现下面错误:
错误如下:
error while loading shared libraries: libiconv.so.2: cannot open shared object file: No such file or directory
make[1]: *** [install-pear-installer] 错误 127
make: *** [install-pear] Error 2
============================================
google了下,试了很多方法都不行,find后,发现我的/usr/local/lib里面有库文件,但是/usr/lib里面没有。
于是用软链接:
ln -s /usr/local/lib/libiconv.so.2 /usr/lib/libiconv.so.2
之后 make clean
再编译 生成 安装,一切正常。
=================================================
另外出现libmysqlclient.so.15、libmysqlclient.so.16错误,同样可以去/usr/local/mysql/lib下面复制这两个文件到/usr/lib下面,或者直接设置软链接。。。
再make clean,重新编译安装即可。
原址有相关libmysqlclient.so.15、libmysqlclient.so.16、libiconv.so.2下载
====》
libltdl.so.3: cannot open shared object file: No
such file or directory异常
解决:执行[root@localhost ~]# ln -s /usr/local/lib/libltdl.so.3 /usr/lib/libltdl.so.3 即可
在安装php时,报如下错误
In file included from /kk/php-5.4.0/ext/gd/gd.c:103:
/kk/php-5.4.0/ext/gd/gd_ctx.c: In function ‘_php_image_stream_putc’:
/kk/php-5.4.0/ext/gd/gd_ctx.c:51: 错误:‘struct gdIOCtx’ 没有名为 ‘data’ 的成员
/kk/php-5.4.0/ext/gd/gd_ctx.c: In function ‘_php_image_stream_putbuf’:
/kk/php-5.4.0/ext/gd/gd_ctx.c:58: 错误:‘struct gdIOCtx’ 没有名为 ‘data’ 的成员
/kk/php-5.4.0/ext/gd/gd_ctx.c: In function ‘_php_image_stream_ctxfree’:
/kk/php-5.4.0/ext/gd/gd_ctx.c:67: 错误:‘struct gdIOCtx’ 没有名为 ‘data’ 的成员
/kk/php-5.4.0/ext/gd/gd_ctx.c:68: 错误:‘struct gdIOCtx’ 没有名为 ‘data’ 的成员
/kk/php-5.4.0/ext/gd/gd_ctx.c:69: 错误:‘struct gdIOCtx’ 没有名为 ‘data’ 的成员
/kk/php-5.4.0/ext/gd/gd_ctx.c: In function ‘_php_image_output_ctx’:
/kk/php-5.4.0/ext/gd/gd_ctx.c:153: 错误:‘gdIOCtx’ 没有名为 ‘data’ 的成员
make: *** [ext/gd/gd.lo] 错误 1
好像说这个错误算是php5.4的bug,下面对应的两篇文章有对应的说明:
https://bugs.php.net/bug.php?id=55224 https://bugs.php.net/bug.php?id=60108
解决方法
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;
centos6.4编译安装php 5.4.X时,configure能正常通过,但是在make的时候提示:
In file included from /root/php-5.3.6/ext/gd/libgd/gd_compat.c:8:
/usr/local/jpeg/include/jpeglib.h:938: error: expected declaration specifiers or ‘...’ before ‘FILE’
/usr/local/jpeg/include/jpeglib.h:939: error: expected declaration specifiers or ‘...’ before ‘FILE’
make: *** [ext/gd/libgd/gd_compat.lo] Error 1
修改php-5.4.9/ext/gd/libgd/gd_compat.c 把png.h 改成绝对路径(这个在编译gd库的时候应该就碰到了,同样的路径即可)
并在# include <jpeglib.h> 前面增加一行 #include <stdio.h>
修改后如下所示:
#include "php_config.h"
#ifdef H***E_GD_PNG
/* needs to be first */
# include </usr/local/libpng/include/png.h> //修改此处
#endif
#ifdef H***E_GD_JPG
#include <stdio.h> //修改此处
# include <jpeglib.h>
#endif
然后make clean
重新configure 、make 、make install 就可以了。
第二例:
configure能正常通过,make配置到最后报错:make: *** [ext/gd/gd.lo] Error 1
据说这个错误是php5.4的bug:
解决方法
vim /usr/local/gd2/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);
int (*seek) (struct gdIOCtx *, const int);
long (*tell) (struct gdIOCtx *);
void (*gd_free) (struct gdIOCtx *);
void (*data); //新增的内容
}
gdIOCtx;
==========================================================
重新编译前最好执行如下:
[root@localhost php-5.4.5]# make clean
重新configure 、make 、make install 就可以了。
这个错误算是php5.4的bug,下面对应的两篇文章有对应的说明:
https://bugs.php.net/bug.php?id=55224 https://bugs.php.net/bug.php?id=60108
php-5.5.10/ext/gd/gd.c:57:22: 错误:X11/xpm.h:没有那个文件或目录 make: *** [ext/gd/gd.lo] 错误 1
编译、生成php都正常,在安装的时候出现下面错误:
错误如下:
error while loading shared libraries: libiconv.so.2: cannot open shared object file: No such file or directory
make[1]: *** [install-pear-installer] 错误 127
make: *** [install-pear] Error 2
============================================
google了下,试了很多方法都不行,find后,发现我的/usr/local/lib里面有库文件,但是/usr/lib里面没有。
于是用软链接:
ln -s /usr/local/lib/libiconv.so.2 /usr/lib/libiconv.so.2
之后 make clean
再编译 生成 安装,一切正常。
=================================================
另外出现libmysqlclient.so.15、libmysqlclient.so.16错误,同样可以去/usr/local/mysql/lib下面复制这两个文件到/usr/lib下面,或者直接设置软链接。。。
再make clean,重新编译安装即可。
原址有相关libmysqlclient.so.15、libmysqlclient.so.16、libiconv.so.2下载
====》
libltdl.so.3: cannot open shared object file: No
such file or directory异常
解决:执行[root@localhost ~]# ln -s /usr/local/lib/libltdl.so.3 /usr/lib/libltdl.so.3 即可
php5.4安装报错 ‘gdIOCtx’ 没有名为 ‘data’ 的成员
在安装php时,报如下错误In file included from /kk/php-5.4.0/ext/gd/gd.c:103:
/kk/php-5.4.0/ext/gd/gd_ctx.c: In function ‘_php_image_stream_putc’:
/kk/php-5.4.0/ext/gd/gd_ctx.c:51: 错误:‘struct gdIOCtx’ 没有名为 ‘data’ 的成员
/kk/php-5.4.0/ext/gd/gd_ctx.c: In function ‘_php_image_stream_putbuf’:
/kk/php-5.4.0/ext/gd/gd_ctx.c:58: 错误:‘struct gdIOCtx’ 没有名为 ‘data’ 的成员
/kk/php-5.4.0/ext/gd/gd_ctx.c: In function ‘_php_image_stream_ctxfree’:
/kk/php-5.4.0/ext/gd/gd_ctx.c:67: 错误:‘struct gdIOCtx’ 没有名为 ‘data’ 的成员
/kk/php-5.4.0/ext/gd/gd_ctx.c:68: 错误:‘struct gdIOCtx’ 没有名为 ‘data’ 的成员
/kk/php-5.4.0/ext/gd/gd_ctx.c:69: 错误:‘struct gdIOCtx’ 没有名为 ‘data’ 的成员
/kk/php-5.4.0/ext/gd/gd_ctx.c: In function ‘_php_image_output_ctx’:
/kk/php-5.4.0/ext/gd/gd_ctx.c:153: 错误:‘gdIOCtx’ 没有名为 ‘data’ 的成员
make: *** [ext/gd/gd.lo] 错误 1
好像说这个错误算是php5.4的bug,下面对应的两篇文章有对应的说明:
https://bugs.php.net/bug.php?id=55224 https://bugs.php.net/bug.php?id=60108
解决方法
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;
centos6.4编译安装php 5.4.X时,configure能正常通过,但是在make的时候提示:
In file included from /root/php-5.3.6/ext/gd/libgd/gd_compat.c:8:
/usr/local/jpeg/include/jpeglib.h:938: error: expected declaration specifiers or ‘...’ before ‘FILE’
/usr/local/jpeg/include/jpeglib.h:939: error: expected declaration specifiers or ‘...’ before ‘FILE’
make: *** [ext/gd/libgd/gd_compat.lo] Error 1
修改php-5.4.9/ext/gd/libgd/gd_compat.c 把png.h 改成绝对路径(这个在编译gd库的时候应该就碰到了,同样的路径即可)
并在# include <jpeglib.h> 前面增加一行 #include <stdio.h>
修改后如下所示:
#include "php_config.h"
#ifdef H***E_GD_PNG
/* needs to be first */
# include </usr/local/libpng/include/png.h> //修改此处
#endif
#ifdef H***E_GD_JPG
#include <stdio.h> //修改此处
# include <jpeglib.h>
#endif
然后make clean
重新configure 、make 、make install 就可以了。
第二例:
configure能正常通过,make配置到最后报错:make: *** [ext/gd/gd.lo] Error 1
据说这个错误是php5.4的bug:
解决方法
vim /usr/local/gd2/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);
int (*seek) (struct gdIOCtx *, const int);
long (*tell) (struct gdIOCtx *);
void (*gd_free) (struct gdIOCtx *);
void (*data); //新增的内容
}
gdIOCtx;
==========================================================
重新编译前最好执行如下:
[root@localhost php-5.4.5]# make clean
重新configure 、make 、make install 就可以了。
这个错误算是php5.4的bug,下面对应的两篇文章有对应的说明:
https://bugs.php.net/bug.php?id=55224 https://bugs.php.net/bug.php?id=60108
php-5.5.10/ext/gd/gd.c:57:22: 错误:X11/xpm.h:没有那个文件或目录 make: *** [ext/gd/gd.lo] 错误 1
先 :yum install libXpm-devel在查询他的安装位置:
#rpm -ql libXpm-devel /usr/bin/cxpm /usr/bin/sxpm /usr/include/X11/xpm.h /usr/lib/libXpm.so /usr/lib/pkgconfig/xpm.pc /usr/share/man/man1/cxpm.1.gz /usr/share/man/man1/sxpm.1.gz
在PHP的./configure配置中添加:--with-xpm-dir=/usr/lib配置
相关文章推荐
- 搭建嵌入式交叉环境编译出现的问题
- 关于安装lamp环境之后出现的问题的排查
- 编译安装LAMP平台和出现的问题
- Windows环境中编译opencv3.0同时加入OpenCV_contrib库及解决遇到相关问题
- 32,64位编译环境下的sizeof问题经常出现。
- Windows环境中编译opencv3.0同时加入OPENCV_contrib库及解决遇到相关问题
- Linux|UNIX下LAMP环境的搭建及常见问题[连载9编译Apache]
- php(LAMP)开发环境配置相关问题及解决办法
- 一键安装lamp环境出现的问题
- OPNET Modeler & Visual Studio 2010 环境下编译 Process Model 可能出现的问题
- linux环境下启动tomcat7出现时间过长(已经编译完成的项目)问题解决!
- notepad++ c++ python 编译环境中出现的问题及部分解决方案
- 配置chrome编译环境,安装windows sdk 6.1出现的问题。
- DirectShow 在VS2005/VS2010中环境配置和编译运行出现 winnt.h(5940)错误问题的解决
- LAMP环境搭建过程中出现的问题——基于VM虚拟CentOS-5.6
- 建立自己的交叉编译环境(米搞定,但解决了其中出现的很多问题)
- Qt4.8.5 开发环境搭建没有生成makefile文件【编译出现的问题】
- 项目中某些静态库缺少,或者编译环境的问题造成的相关编译错误(Undefined symbols for architecture x86_64:)
- Mac 环境下ffmpeg编译出现 errno.h: No such file or directory 错误问题
- oracle11g安装出现TNS:协议适配器错误问题相关整理总结