VPS侦探论坛

标题: php安装出错 [打印本页]

作者: dowern    时间: 2011-4-19 09:30
标题: php安装出错
系统 center os 5.6 32位, 使用./cen... 安装方式发现php没有安装, php -v无版本提示,手动安装php,  ./configure没问题, 但是make, make all均提示出错.
错误代码如下:
  1. [root@vps php-5.2.14]# make all
  2. /bin/sh /root/soft/lnmp0.6-full/php-5.2.14/libtool --silent --preserve-dup-deps --mode=compile cc -I/root/soft/lnmp0.6-full/php-5.2.14/ext/pdo_sqlite/sqlite/src -DPDO_SQLITE_BUNDLED=1 -DSQLITE_OMIT_CURSOR -DTHREADSAFE=0 -I/root/soft/lnmp0.6-full/php-5.2.14/ext -Iext/pdo_sqlite/ -I/root/soft/lnmp0.6-full/php-5.2.14/ext/pdo_sqlite/ -DPHP_ATOM_INC -I/root/soft/lnmp0.6-full/php-5.2.14/include -I/root/soft/lnmp0.6-full/php-5.2.14/main -I/root/soft/lnmp0.6-full/php-5.2.14 -I/root/soft/lnmp0.6-full/php-5.2.14/ext/date/lib -I/usr/include/libxml2 -I/root/soft/lnmp0.6-full/php-5.2.14/TSRM -I/root/soft/lnmp0.6-full/php-5.2.14/Zend    -I/usr/local/include -g -O2  -c /root/soft/lnmp0.6-full/php-5.2.14/ext/pdo_sqlite/sqlite/src/parse.c -o ext/pdo_sqlite/sqlite/src/parse.lo
  3. /bin/sh /root/soft/lnmp0.6-full/php-5.2.14/libtool --silent --preserve-dup-deps --mode=compile cc  -Iext/standard/ -I/root/soft/lnmp0.6-full/php-5.2.14/ext/standard/ -DPHP_ATOM_INC -I/root/soft/lnmp0.6-full/php-5.2.14/include -I/root/soft/lnmp0.6-full/php-5.2.14/main -I/root/soft/lnmp0.6-full/php-5.2.14 -I/root/soft/lnmp0.6-full/php-5.2.14/ext/date/lib -I/usr/include/libxml2 -I/root/soft/lnmp0.6-full/php-5.2.14/TSRM -I/root/soft/lnmp0.6-full/php-5.2.14/Zend    -I/usr/local/include -g -O2  -c /root/soft/lnmp0.6-full/php-5.2.14/ext/standard/info.c -o ext/standard/info.lo
  4. /root/soft/lnmp0.6-full/php-5.2.14/ext/standard/info.c: In function ?.hp_print_info?.
  5. /root/soft/lnmp0.6-full/php-5.2.14/ext/standard/info.c:660: error: expected ?.?.before ?.UHOSIN_LOGO_GUID?
  6. /root/soft/lnmp0.6-full/php-5.2.14/ext/standard/info.c:664: error: ?.UHOSIN_PATCH_VERSION?.undeclared (first use in this function)
  7. /root/soft/lnmp0.6-full/php-5.2.14/ext/standard/info.c:664: error: (Each undeclared identifier is reported only once
  8. /root/soft/lnmp0.6-full/php-5.2.14/ext/standard/info.c:664: error: for each function it appears in.)
  9. make: *** [ext/standard/info.lo] Error 1
复制代码



求解决方案.
作者: licess    时间: 2011-4-19 09:42
标题: 回复 1# 的帖子
看提示应该是Suhosin有问题,可以把前面几步中的Suhosin打补丁的命令去掉再重新从php解压操作一般。操作前先删除php的解压目录。
作者: dowern    时间: 2011-4-19 11:21
请问Suhosin打补丁的命令具体是哪几项呢.
作者: licess    时间: 2011-4-19 11:48
标题: 回复 3# 的帖子
gzip -d ./suhosin-patch-5.2.14-0.9.7.patch.gz

patch -p 1 -i ../suhosin-patch-5.2.14-0.9.7.patch
作者: dowern    时间: 2011-4-19 12:19
上面的错误中并没有这些命令, 请问是在centos.sh中去掉吗?
作者: licess    时间: 2011-4-19 12:34
标题: 回复 5# 的帖子
手动安装时去掉就行
作者: dowern    时间: 2011-4-19 12:50
我在操作./buildconf --force的时候提示
  1. [root@vps php-5.2.14]# ./buildconf --force
  2. Forcing buildconf
  3. buildconf: checking installation...
  4. buildconf: autoconf version 2.59 (ok)
  5. buildconf: Your version of autoconf likely contains buggy cache code.
  6.            Running vcsclean for you.
  7.            To avoid this, install autoconf-2.13.
  8. Can't figure out your VCS, not cleaning.
  9. rebuilding aclocal.m4
  10. rebuilding configure
  11. aclocal.m4:2150: PHP_PROG_LEX is expanded from...
  12. rebuilding main/php_config.h.in
  13. autoheader: WARNING: Using auxiliary files such as `acconfig.h', `config.h.bot'
  14. autoheader: WARNING: and `config.h.top', to define templates for `config.h.in'
  15. autoheader: WARNING: is deprecated and discouraged.
  16. autoheader:
  17. autoheader: WARNING: Using the third argument of `AC_DEFINE' and
  18. autoheader: WARNING: `AC_DEFINE_UNQUOTED' allows to define a template without
  19. autoheader: WARNING: `acconfig.h':
  20. autoheader:
  21. autoheader: WARNING:   AC_DEFINE([NEED_FUNC_MAIN], 1,
  22. autoheader:                 [Define if a function `main' is needed.])
  23. autoheader:
  24. autoheader: WARNING: More sophisticated templates can also be produced, see the
  25. autoheader: WARNING: documentation.
  26. aclocal.m4:2150: PHP_PROG_LEX is expanded from...
复制代码



意思是不是需要更换autoconf 的版本?
作者: licess    时间: 2011-4-19 13:07
标题: 回复 7# 的帖子

wget -c http://ftp.gnu.org/gnu/autoconf/autoconf-2.13.tar.gz
tar zxvf autoconf-2.13.tar.gz
cd autoconf-2.13/
./configure --prefix=/usr/local/autoconf-2.13
make && make install
cd ../

export PHP_AUTOCONF=/usr/local/autoconf-2.13/bin/autoconf
export PHP_AUTOHEADER=/usr/local/autoconf-2.13/bin/autoheader
作者: dowern    时间: 2011-4-19 13:38
标题: 回复 8# 的帖子
该问题完美解决, 谢谢军哥的帮助.




欢迎光临 VPS侦探论坛 (https://bbs.lnmp.com/) Powered by Discuz! X3.4