容器技术交流

 找回密码
 立即注册
查看: 8349|回复: 13

Php 安装不成功!停止安装LuNamp2.0

[复制链接]
发表于 2011-8-5 15:09:18 | 显示全部楼层 |阅读模式

cc1: out of memory allocating 1043280 bytes after a total of 17424384 bytes
make: *** [ext/date/lib/parse_date.lo] Error 1
./php/php.sh: line 78: /usr/local/php/lib/php.ini: No such file or directory
/usr/local/php/lib/php.ini 不存在,没安装成功!
Php 安装不成功!停止安装LuNamp2.0
Php is not installed! Stop to install .

LuNamp安装失败
LuNamp was install failed

我在VPS上安装的,请问怎么回事啊?如何解决啊?
发表于 2011-10-13 03:43:24 | 显示全部楼层
请问你用的是什么程序
发表于 2011-11-1 01:00:00 | 显示全部楼层
本帖最后由 husw 于 2011-11-1 01:45 编辑

我也遇到了这个问题

好像是curl的问题
发表于 2011-11-3 07:58:44 | 显示全部楼层
本帖最后由 husw 于 2011-11-4 16:36 编辑

我解决了

2011.11.3 7:52最新更新:
最终解决方法就是安装:
  1. sudo apt-get install libcurl4-gnutls-dev
复制代码
详情请看: http://www.husw.net/blog/post/1355/

忘记说一下,我的环境是ubuntu11.10
发表于 2011-11-3 08:00:56 | 显示全部楼层
不容易啊,一晚上就折腾成功了这个!
发表于 2011-11-7 18:30:52 | 显示全部楼层
水平很高啊,值得学习
发表于 2011-11-8 14:21:51 | 显示全部楼层
{:soso_e183:}
发表于 2011-11-12 00:58:49 | 显示全部楼层
又遇到新问题了!
  1. ext/openssl/xp_ssl.o: In function `php_openssl_setup_crypto':
  2. /home/husw/zijidelu_install/LuNamp/soft/php-5.2.17/ext/openssl/xp_ssl.c:357: undefined reference to `SSLv2_server_method'
  3. /home/husw/zijidelu_install/LuNamp/soft/php-5.2.17/ext/openssl/xp_ssl.c:337: undefined reference to `SSLv2_client_method'
  4. collect2: ld returned 1 exit status
  5. make: *** [sapi/cgi/php-cgi] 错误 1
  6. ./php/php_fcgi.sh: 行 80: /usr/local/php_fcgi/lib/php.ini: 没有那个文件或目录
  7. /usr/local/php_fcgi/lib/php.ini 不存在,没安装成功!

  8. Php_fcgi 安装不成功!停止安装LuNamp2.0
  9. Php_fcgi is not installed! Stop to install .

  10. LuNamp安装失败
  11. LuNamp was install failed
复制代码
查子很多资料说是PHP的BUG,SSLv2这个东西有个补丁,但是不会打,打不上。
补丁地址:http://anonscm.debian.org/gitweb ... 8347bdf89ea862dbd92
不知如何解决,请洞主有空看一下!
发表于 2011-11-12 01:24:44 | 显示全部楼层
本帖最后由 husw 于 2011-11-12 02:00 编辑

补丁打成功了,又折腾了很长时间!

知识储备太重要了!

给出解决方案:

下载补丁文件:disable_SSLv2_for_openssl_1_0_0.patch
放到PHP扩展文件目录中的openssl中,我的路径是:
  1. /home/husw/zijidelu_install/LuNamp/soft/php-5.2.17/ext/openssl
复制代码

所以:
  1. root@husw:/home/husw# cd '/home/husw/zijidelu_install/LuNamp/soft/php-5.2.17/ext/openssl'
  2. root@husw:/home/husw/zijidelu_install/LuNamp/soft/php-5.2.17/ext/openssl# patch -p3 <debian-patches-disable_SSLv2_for_openssl_1_0_0.patch #给xp_ssl.c打补丁
  3. patching file xp_ssl.c
  4. Hunk #1 succeeded at 332 (offset 4 lines).
  5. Hunk #2 succeeded at 354 (offset 4 lines).
  6. Hunk #3 succeeded at 583 (offset -50 lines).
  7. Hunk #4 succeeded at 819 (offset -98 lines).
  8. #打补丁成功,然后重新安装./zijidelu_install.sh
  9. root@husw:/home/husw/zijidelu_install/LuNamp/soft/php-5.2.17/ext/openssl# cd /home/husw
  10. root@husw:/home/husw# ./zijidelu_install.sh
复制代码

另外简单说一下如何打补丁。
先去下载你需要的补丁包(包里一般有一个补丁文件的,因为如果有不同的版本,就肯定会有补丁的),然后用命令:patch 命令打包就行了。具体用法如下:
  1. patch -p[num] <patchfile
复制代码
"patchfile"是你下载的补丁文件,在这个补丁文件里一般都有要给那个文件打补丁的路径,
如:a/ext/openssl/xp_ssl.c 就是给xp_ssl.c打补丁;
而 -p[num]的作用就是去掉这个路径的第几个“/“前的内容,
如:patch -p1 <patchfile 就是给ext/openssl/xp_ssl.c 打补丁,
patch -p3 <patchfile 就是给xp_ssl.c 打补丁。
这里的路径怎么定就要看你把你的补丁文件放在什么目录了。

以上内容参考:http://zhidao.baidu.com/question/319147840.html

我这边还在编译安装中,还不知道能不能成功,过程先记下来!
发表于 2011-11-12 01:35:16 | 显示全部楼层
本帖最后由 husw 于 2011-11-12 01:36 编辑

郁闷,还是不成功,同样的错误!

是不是编译参数需要改一下啊?

对这个不熟悉啊!{:soso_e127:}
发表于 2011-11-12 03:06:32 | 显示全部楼层
找着原因了,重新./zijidelu_install.sh安装的时候,会把原先已经存在的安装包删除,重新解压一个新的安装包文件夹在那里,意思就是我之前已经打过补丁的PHP源码文件夹已经被删除,又重新解压了一个在那里,等于我打补丁的工作白做了。所以需要对默认的安装压缩包做一下替换,替换成打过补丁的包。重装安装即可。{:soso_e113:}

  1. Build complete.
  2. Don't forget to run 'make test'.

  3. Installing shared extensions:     /usr/local/php_fcgi/lib/php/extensions/no-debug-non-zts-20060613/

  4. Php_fcgi 安装成功,继续安装LuNamp2.0
  5. Php_fcgi was successfully installed! Continue...

  6. 已耗时:9 分钟
  7. Runtime: 9 分钟

  8. 。。。。。。N分钟之后。。。。。。

  9. LuNamp安装完成,谢谢您的使用!
  10. LuNamp was successfully installed!, Thank you for choosing LuNamp!

  11. 总耗时:27 分钟
  12. Total runtime: 27 分钟

  13. 请按任意键继续安装或升级LuManager!
  14. Please press any key to continue install or update LuManager!
复制代码
发表于 2011-11-12 03:07:27 | 显示全部楼层
本帖最后由 husw 于 2011-11-12 03:07 编辑

OH MY GOD! 完美解决了!   

不容易啊。。。{:soso_e116:}
发表于 2011-12-26 17:07:33 | 显示全部楼层
楼上的,能不能详细说下怎么替换为自己打过补丁的包啊?感激不尽!
发表于 2011-12-27 15:13:38 | 显示全部楼层
我按照husw说的,把 php-5.2.17.tar.gz 替换成了我打过补丁的,结果安装的时候,有一大串要选择N/Y的选项,如果选N就还是安装不成功,然后选Y,安装是成功了,可惜启动失败了。apache和nginx都失败。不知道什么原因,哪位大神来救救我啊
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

手机版|小黑屋|Archiver|URLOS ( 粤ICP备18087780号 )

GMT+8, 2025-5-15 22:57 , Processed in 0.032159 second(s), 18 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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