lamp环境编译出现的相关问题
来源:互联网 发布:淘宝女装店哪个好 编辑:程序博客网 时间:2024/05/01 02:35
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 即可
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 HAVE_GD_PNG
/* needs to be first */
# include </usr/local/libpng/include/png.h> //修改此处
#endif
#ifdef HAVE_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环境之后出现的问题的排查
- 源码环境下编译出现的问题
- LAMP环境的搭建(编译安装)
- lamp 环境编译
- lamp 环境编译
- 源代码编译lamp环境
- LAMP环境编译
- LAMP 环境编译
- 编译安装lamp环境
- lamp环境编译安装
- 编译安装lamp环境
- lamp 环境搭建遇到的问题
- LAMP环境搭建及遇到的问题
- 搭建嵌入式交叉环境编译出现的问题
- LAMP环境相关(ubuntu)
- LAMP环境搭建问题
- centos6.5 编译安装lamp以及相关错误的解决
- javaSE-面向对象-多态
- 《大话设计》——行为型模式
- Objective C运行时(runtime)技术的几个要点总结
- ActionBar - API
- 如何拦截Android系统短信
- lamp环境编译出现的相关问题
- 算法导论之堆排序
- 求立方根
- IOCP接收性能测试。瓶颈或者问题?
- 常用的DOS命令
- gitHub常用命令
- Lua模式匹配
- 双色Hanoi塔问题
- uva11988 - Broken Keyboard (a.k.a. Beiju Text) 模拟 链表