VPS侦探论坛

 找回密码
 注册
查看: 8773|回复: 8

php安装出错

[复制链接]
发表于 2011-4-19 09:30:22 | 显示全部楼层 |阅读模式

系统 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
复制代码



求解决方案.
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
发表于 2011-4-19 09:42:42 | 显示全部楼层

回复 1# 的帖子



看提示应该是Suhosin有问题,可以把前面几步中的Suhosin打补丁的命令去掉再重新从php解压操作一般。操作前先删除php的解压目录。
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
 楼主| 发表于 2011-4-19 11:21:53 | 显示全部楼层

请问Suhosin打补丁的命令具体是哪几项呢.
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
发表于 2011-4-19 11:48:21 | 显示全部楼层

回复 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
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
 楼主| 发表于 2011-4-19 12:19:31 | 显示全部楼层

上面的错误中并没有这些命令, 请问是在centos.sh中去掉吗?

军哥运维代购:http://shop63846532.taobao.com/

发表于 2011-4-19 12:34:44 | 显示全部楼层

回复 5# 的帖子


手动安装时去掉就行
 楼主| 发表于 2011-4-19 12:50:44 | 显示全部楼层

我在操作./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 的版本?
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
发表于 2011-4-19 13:07:25 | 显示全部楼层

回复 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
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
 楼主| 发表于 2011-4-19 13:38:57 | 显示全部楼层

回复 8# 的帖子


该问题完美解决, 谢谢军哥的帮助.

军哥运维代购:http://shop63846532.taobao.com/

您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|Archiver|VPS侦探 ( 鲁ICP备16040043号-1 )

GMT+8, 2024-9-20 07:51 , Processed in 0.028148 second(s), 17 queries .

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表