LAMP 源代码包安装异常记录(64位)
2014-05-04 18:27
776 查看
###安装JPG6###
安装jpg-6b 时,编译出错:
make: ./libtool: Command not found
make: *** [jcapimin.lo] Error 127
原因是libtool版本过低了.
查看下libtool安装的版本
<!--lang:shell-->
rpm -qa | grep libtool*
去网上下一个新点的libtool, 我用的是 libtool-2.4.2.tar.gz
然后进入jpeg-6b的源码目录,然后执行以下步骤,切记!
<!--lang:shell-->
cp /usr/share/libtool/config/config.sub .
cp /usr/share/libtool/config/config.guess .
./configure --prefix=/usr/local/jpeg6/ --enable-shared --enable-static
make
mkdir -p /usr/local/man/man1
make install
###安装GD2 错误###
make2: *** [gd_png.lo] 错误 1
make2: Leaving directory
make: *** [all] 错误 2
这是由于文件的本身有错误.
修改如下:
<!--lang:shell-->
vi gd_png.c
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
###安装APACHE###
在编译APACHE 时 会报类似下面的错误:
/usr/bin/ld: /usr/local/lib/libz.a(crc32.o): relocation R_X86_64_32 against `a local symbol' can not be used when making a shared object; recompile with -fPIC
/usr/local/lib/libz.a: could not read symbols: Bad value
这也是64位兼容造成的. 解决方法如下:
进入zlib 源码目录
<!--lang:shell-->
cd zlib-1.2.3
CFLAGS="-O3 -fPIC" ./configure //使用64位元的方法进行编译
make && make install
###安装ncurses###
报错如下:
tic: symbol lookup error: tic: undefined symbol: _nc_check_termtype2
? tic could not build /usr/share/terminfo
make1: *** [install.data] Error 1
make1: Leaving directory `/lamp/ncurses-5.6/misc'
make: *** [install] Error 2
这是由于当前的ncurses版本过低,下在个新版的 ncurses-5.9.tar.gz 再按之前的编译安装就可以了
###安装PHP###
我安装的PHP 版本是5.4,据说安装时有个BUG,报错如下:
In file included from /kk/php-5.4.0/ext/gd/gd.c:103:
/lamp/php-5.4.0/ext/gd/gd_ctx.c: In function ‘_php_image_stream_putc’:
/lamp/php-5.4.0/ext/gd/gd_ctx.c:51: 错误:‘struct gdIOCtx’ 没有名为 ‘data’ 的成员
/lamp/php-5.4.0/ext/gd/gd_ctx.c: In function ‘_php_image_stream_putbuf’:
/lamp/php-5.4.0/ext/gd/gd_ctx.c:58: 错误:‘struct gdIOCtx’ 没有名为 ‘data’ 的成员
/lamp/php-5.4.0/ext/gd/gd_ctx.c: In function ‘_php_image_stream_ctxfree’:
/lamp/php-5.4.0/ext/gd/gd_ctx.c:67: 错误:‘struct gdIOCtx’ 没有名为 ‘data’ 的成员
/lamp/php-5.4.0/ext/gd/gd_ctx.c:68: 错误:‘struct gdIOCtx’ 没有名为 ‘data’ 的成员
/lamp/php-5.4.0/ext/gd/gd_ctx.c:69: 错误:‘struct gdIOCtx’ 没有名为 ‘data’ 的成员
/lamp/php-5.4.0/ext/gd/gd_ctx.c: In function ‘_php_image_output_ctx’:
/lamp/php-5.4.0/ext/gd/gd_ctx.c:153: 错误:‘gdIOCtx’ 没有名为 ‘data’ 的成员
make: *** [ext/gd/gd.lo] 错误 1
解决办法如下:
先进入安装PHP 的时候 关联 gd2 目录的地方
编辑里面的include/gd_io.h
在gdIOCtx结构中增加void *data;
###安装PDO###
安装PDO的时候会报这样的错误:
PDO_MYSQL-1.0.2/php_pdo_mysql_int.h:53: error: expected specifier-qualifier-list before ‘MYSQL_RES’
......
make: *** [pdo_mysql.lo] Error 1
这是因为在编译时需要mysql的头的文件,而它按默认搜索找不到头文件的位置,所以才出现这个问题.所以要将
<!--lang:shell-->
ln -s {mysql安装文件路径}/include/mysql/* /usr/local/include/
###安装ZEND加速器###
PHP5.3以上的版本不再支持Zend Optimizer,已经被全新的 Zend Guard Loader 取代
去官网下载合适的版本
将下载的包解压,把里面的
然后修改
<!--lang:shell-->
zend_extension=/usr/local/php/lib/php/extensions/no-debug-non-zts-20100525/ZendGuardLoader.so
zend_loader.enable=1
zend_loader.disable_licensing=0
zend_loader.obfuscation_level_support=3
zend_loader.license_path=
安装jpg-6b 时,编译出错:
make: ./libtool: Command not found
make: *** [jcapimin.lo] Error 127
原因是libtool版本过低了.
查看下libtool安装的版本
<!--lang:shell-->
rpm -qa | grep libtool*
去网上下一个新点的libtool, 我用的是 libtool-2.4.2.tar.gz
<!--lang:shell--> ./configure make && make install
然后进入jpeg-6b的源码目录,然后执行以下步骤,切记!
<!--lang:shell-->
cp /usr/share/libtool/config/config.sub .
cp /usr/share/libtool/config/config.guess .
./configure --prefix=/usr/local/jpeg6/ --enable-shared --enable-static
make
mkdir -p /usr/local/man/man1
make install
###安装GD2 错误###
make2: *** [gd_png.lo] 错误 1
make2: Leaving directory
/usr/src/gd-2.0.35' make[1]: *** [all-recursive] 错误 1 make[1]: Leaving directory/usr/src/gd-2.0.35'
make: *** [all] 错误 2
这是由于文件的本身有错误.
修改如下:
<!--lang:shell-->
vi gd_png.c
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include <stdio.h> #include <math.h> #include <string.h> #include <stdlib.h> #include "gd.h" #ifdef HAVE_LIBPNG #include "gdhelpers.h" #修改下面: #include "/usr/local/libpng/include/png.h" #define TRUE 1 #define FALSE 0" #ifdef HAVE_LIBPNG
###安装APACHE###
在编译APACHE 时 会报类似下面的错误:
/usr/bin/ld: /usr/local/lib/libz.a(crc32.o): relocation R_X86_64_32 against `a local symbol' can not be used when making a shared object; recompile with -fPIC
/usr/local/lib/libz.a: could not read symbols: Bad value
这也是64位兼容造成的. 解决方法如下:
进入zlib 源码目录
<!--lang:shell-->
cd zlib-1.2.3
CFLAGS="-O3 -fPIC" ./configure //使用64位元的方法进行编译
make && make install
###安装ncurses###
报错如下:
tic: symbol lookup error: tic: undefined symbol: _nc_check_termtype2
? tic could not build /usr/share/terminfo
make1: *** [install.data] Error 1
make1: Leaving directory `/lamp/ncurses-5.6/misc'
make: *** [install] Error 2
这是由于当前的ncurses版本过低,下在个新版的 ncurses-5.9.tar.gz 再按之前的编译安装就可以了
###安装PHP###
我安装的PHP 版本是5.4,据说安装时有个BUG,报错如下:
In file included from /kk/php-5.4.0/ext/gd/gd.c:103:
/lamp/php-5.4.0/ext/gd/gd_ctx.c: In function ‘_php_image_stream_putc’:
/lamp/php-5.4.0/ext/gd/gd_ctx.c:51: 错误:‘struct gdIOCtx’ 没有名为 ‘data’ 的成员
/lamp/php-5.4.0/ext/gd/gd_ctx.c: In function ‘_php_image_stream_putbuf’:
/lamp/php-5.4.0/ext/gd/gd_ctx.c:58: 错误:‘struct gdIOCtx’ 没有名为 ‘data’ 的成员
/lamp/php-5.4.0/ext/gd/gd_ctx.c: In function ‘_php_image_stream_ctxfree’:
/lamp/php-5.4.0/ext/gd/gd_ctx.c:67: 错误:‘struct gdIOCtx’ 没有名为 ‘data’ 的成员
/lamp/php-5.4.0/ext/gd/gd_ctx.c:68: 错误:‘struct gdIOCtx’ 没有名为 ‘data’ 的成员
/lamp/php-5.4.0/ext/gd/gd_ctx.c:69: 错误:‘struct gdIOCtx’ 没有名为 ‘data’ 的成员
/lamp/php-5.4.0/ext/gd/gd_ctx.c: In function ‘_php_image_output_ctx’:
/lamp/php-5.4.0/ext/gd/gd_ctx.c:153: 错误:‘gdIOCtx’ 没有名为 ‘data’ 的成员
make: *** [ext/gd/gd.lo] 错误 1
解决办法如下:
先进入安装PHP 的时候 关联 gd2 目录的地方
编辑里面的include/gd_io.h
在gdIOCtx结构中增加void *data;
<!--lang:shell--> 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;
###安装PDO###
安装PDO的时候会报这样的错误:
PDO_MYSQL-1.0.2/php_pdo_mysql_int.h:53: error: expected specifier-qualifier-list before ‘MYSQL_RES’
......
make: *** [pdo_mysql.lo] Error 1
这是因为在编译时需要mysql的头的文件,而它按默认搜索找不到头文件的位置,所以才出现这个问题.所以要将
/usr/local/mysql/include/目录下的mysql头文件链接到
/usr/local/include/的目录下:
<!--lang:shell-->
ln -s {mysql安装文件路径}/include/mysql/* /usr/local/include/
###安装ZEND加速器###
PHP5.3以上的版本不再支持Zend Optimizer,已经被全新的 Zend Guard Loader 取代
去官网下载合适的版本
将下载的包解压,把里面的
.so文件 拷到PHP的扩展目录里 我的是
/usr/local/php/lib/php/extensions/no-debug-non-zts-20100525
然后修改
php.ini
<!--lang:shell-->
zend_extension=/usr/local/php/lib/php/extensions/no-debug-non-zts-20100525/ZendGuardLoader.so
zend_loader.enable=1
zend_loader.disable_licensing=0
zend_loader.obfuscation_level_support=3
zend_loader.license_path=
相关文章推荐
- linux服务器CentOS 5.7(64位)安装配置LAMP服务器(Apache+PHP5+MySQL)
- (原创)LAMP教程4-用VirtualBox安装64位的centos6.4
- win10 64位 Python 安装matplotlib 过程记录
- CentOS5(64位)下Apache+SVN+Submin2安装记录
- ubuntu 12.04 64位,安装mysql-workbench问题解决记录
- Python模块Pyqt 安装失败记录 不支持64位的操作系统
- 关于Linux 64位安装hadoop2.2.0报异常的解决方法
- 阿里云服务器CentOS 5.7(64位)安装配置LAMP服务器(Apache+PHP5+MySQL
- 阿里云服务器CentOS 5.7(64位)安装配置LAMP服务器(Apache+PHP5+MySQL)
- wdOS1.0(64位)发布了(集成lamp,lnmp,lnamp,wdcp安装ISO下载)
- redhat 6.2 64位安装中文输入法全过程记录
- 阿里云服务器CentOS 5.7(64位)安装配置LAMP服务器(Apache+PHP5+MySQL)
- CentOS 6.2 X64上64位Oracle11gR2 静默安装,静默设置监听,静默建库亲自实践记录
- 阿里云服务器CentOS(64位)安装配置LAMP服务器(Linux+Apache+PHP5+MySQL)
- redhat 6.3 64位安装中文输入法全过程记录
- win7 64位安装oracle10g出现未知错误,程序异常终止解决方法
- CentOs7 LAMP Drupal安装记录
- Oracle安装在64位系统中报“程序异常终止。发生内部错误”
- 生产环境下的centos6.2 64位下LAMP安装
- mysql 64位免安装版记录