[Php 安装不成功!停止安装LuNamp2.0]的解决办法

我就是个世界13年前Linux7841
在ubuntu11.10上安装LuManager1.1.9报错:
[code]
...
checking for cURL support... yes
checking if we should use cURL for url streams... yes
checking for cURL in default path... not found
configure: error: Please reinstall the libcurl distribution -
    easy.h should be in <curl-dir>/include/curl/
make: *** 没有指明目标并且找不到 makefile。 停止。
make: *** 没有规则可以创建目标“install”。 停止。
./php/php.sh: 82: cannot create /usr/local/php/lib/php.ini: Directory nonexistent
/usr/local/php/lib/php.ini 不存在,没安装成功!

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

LuNamp安装失败
LuNamp was install failed
[/code]

[b][color=#FF0000]2011.11.12 02:58  最后更新  完美解决,请耐心往下看
----------------------------------[/color][/b]
[b][color=#0000FF]2011.11.3 7:52最新更新:
最终解决方法就是安装: [/color] [color=#FF0000]sudo apt-get install libcurl4-gnutls-dev[/color][/b]
[separator]
原因是没有找到编译安装PHP的参数curl,[strike]这个可能和安装脚本有关系[/strike],我自己修改了一下安装脚本zijidelu_install/LuNamp/code/php/php.sh中第64行,
[code]--with-curl=/usr/local/curl \[/code]
改为
[code]--with-curl \[/code]
然后再重装LuManager,
[code]./zijidelu_install.sh -y[/code]
已经安装好的软件会自动跳过,放心装吧。
然后php安装成功!
但是Php_fcgi 又出现这个问题:
[code]
checking for cURL support... yes
checking if we should use cURL for url streams... yes
checking for cURL in default path... not found
configure: error: Please reinstall the libcurl distribution -
    easy.h should be in <curl-dir>/include/curl/
make: *** 没有指明目标并且找不到 makefile。 停止。
make: *** 没有规则可以创建目标“install”。 停止。
./php/php_fcgi.sh: 84: cannot create /usr/local/php_fcgi/lib/php.ini: Directory nonexistent
/usr/local/php_fcgi/lib/php.ini 不存在,没安装成功!

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

LuNamp安装失败
LuNamp was install failed
[/code]

返回去看一下刚才的编译过程,发现刚才编译PHP的时候好像没有使用cURL,看到有这一行,
[code] checking if we should use cURL for url streams... no[/code]
说明curl还是不对,又搜索了一圈,试重装curl,都无果!再仔细看错误提示,有这么一行
[code] easy.h should be in <curl-dir>/include/curl/[/code]
那说明curl的路径应该是 /include/curl/ 这样子才行得通。
再搜索这个错误提示,
终于找到了这篇文章,[url=http://archive.cnblogs.com/a/2055968/]ubuntu编译安装php5 mysql nginx[/url]
[code]
#如果出现下面的错误提示
#checking for cURL in default path… not found
#configure: error: Please reinstall the libcurl distribution –  easy.h should be in <curl-dir>/include/curl/
#安装:  apt-get install libcurl4-gnutls-dev
[/code]
然后再试[color=#FF0000][b]./zijidelu_install.sh -y[/b][/color]

一切OK了,安装成功!
[quote]
LuNamp安装完成,谢谢您的使用!
LuNamp was successfully installed!, Thank you for choosing LuNamp!

总耗时:27 分钟
Total runtime: 27 分钟

请按任意键继续安装或升级LuManager!
Please press any key to continue install or update LuManager!
[/quote]

不容易啊,一晚上就折腾了个这!
-----------------------
参考资料:
ubuntu编译安装php5 mysql nginx  http://archive.cnblogs.com/a/2055968/
linux下php动态添加扩展 http://linfanps.iteye.com/blog/1150521
linux 安装php 时出现easy.h should be in /include/curl/ 的解决方法  http://blog.csdn.net/lgm252008/article/details/5445671  [其实不是这个原因]
php编译安装常见错误 http://www.hackbase.com/tech/2011-09-09/65235.html

[color=#FF0000]============= 华 丽 丽 的 分 割 线  ========================[/color]

[b][color=#0000FF]2011.11.5 更新: 又遇到新问题了! [/color][/b]

[code]ext/openssl/xp_ssl.o: In function `php_openssl_setup_crypto':
/home/husw/zijidelu_install/LuNamp/soft/php-5.2.17/ext/openssl/xp_ssl.c:357: undefined reference to `SSLv2_server_method'
/home/husw/zijidelu_install/LuNamp/soft/php-5.2.17/ext/openssl/xp_ssl.c:337: undefined reference to `SSLv2_client_method'
collect2: ld returned 1 exit status
make: *** [sapi/cgi/php-cgi] 错误 1
./php/php_fcgi.sh: 行 80: /usr/local/php_fcgi/lib/php.ini: 没有那个文件或目录
/usr/local/php_fcgi/lib/php.ini 不存在,没安装成功!

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

LuNamp安装失败
LuNamp was install failed
[/code]

查子很多资料说是PHP的BUG,SSLv2这个东西有个补丁,但是不会打,打不上。
补丁地址:[url=http://anonscm.debian.org/gitweb/?p=pkg-php/php.git;a=commitdiff;h=3e2e5babbc9b4ae5b25688347bdf89ea862dbd92]http://anonscm.debian.org/gitweb ... 8347bdf89ea862dbd92[/url]
不知如何解决

-------------------------------

[b][color=#0000FF]2011.11.12 01:28 更新:
补丁打成功了,又折腾了很长时间!
知识储备太重要了!
[/color][/b]

[b]给出解决方案:[/b]

下载补丁文件:[url=http://anonscm.debian.org/gitweb/?p=pkg-php/php.git;a=blob_plain;f=debian/patches/disable_SSLv2_for_openssl_1_0_0.patch;hb=3e2e5babbc9b4ae5b25688347bdf89ea862dbd92]disable_SSLv2_for_openssl_1_0_0.patch[/url]
放到PHP扩展文件目录中的openssl中,我的路径是:[code]/home/husw/zijidelu_install/LuNamp/soft/php-5.2.17/ext/openssl[/code]
所以:
[code]root@husw:/home/husw# cd '/home/husw/zijidelu_install/LuNamp/soft/php-5.2.17/ext/openssl'
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打补丁
patching file xp_ssl.c
Hunk #1 succeeded at 332 (offset 4 lines).
Hunk #2 succeeded at 354 (offset 4 lines).
Hunk #3 succeeded at 583 (offset -50 lines).
Hunk #4 succeeded at 819 (offset -98 lines).
#打补丁成功,然后重新安装./zijidelu_install.sh
root@husw:/home/husw/zijidelu_install/LuNamp/soft/php-5.2.17/ext/openssl# cd /home/husw
root@husw:/home/husw# ./zijidelu_install.sh
[/code]
另外简单说一下如何打补丁。
[quote]先去下载你需要的补丁包(包里一般有一个补丁文件的,因为如果有不同的版本,就肯定会有补丁的),然后用命令:patch 命令打包就行了。具体用法如下:
[code]patch -p[num] <patchfile[/code]"patchfile"是你下载的补丁文件,在这个补丁文件里一般都有要给那个文件打补丁的路径,
如:a/ext/openssl/xp_ssl.c 就是给xp_ssl.c打补丁;
而 -p[num]的作用就是去掉这个路径的第几个“/“前的内容,
如:patch -p1 patch -p3 这里的路径怎么定就要看你把你的补丁文件放在什么目录了。

以上内容参考:[url=http://zhidao.baidu.com/question/319147840.html]http://zhidao.baidu.com/question/319147840.html[/url]
[/quote]
我这边还在编译安装中,还不知道能不能成功,过程先记下来!

郁闷,还是不成功,同样的错误!
是不是编译参数需要改一下啊?
对这个编译安装还真不熟悉!

再看看。。。

-------------------------------

[b][color=#FF0000]2011.11.12 02:58  最后更新  完美解决! [/color][/b]

找着原因了,看了一下安装脚本,发现重新./zijidelu_install.sh安装的时候,会把原先已经存在的安装包删除,重新解压一个新的安装包文件夹在那里,意思就是我之前已经打过补丁的PHP源码文件夹已经被删除,又重新解压了一个在那里,等于我打补丁的工作白做了。所以需要对默认的安装压缩包做一下替换,替换成打过补丁的包。重装安装即可。[emot]cool[/emot]

[code]Build complete.
Don't forget to run 'make test'.

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

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

已耗时:9 分钟
Runtime: 9 分钟

。。。。。。N分钟之后。。。。。。

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

总耗时:27 分钟
Total runtime: 27 分钟

请按任意键继续安装或升级LuManager!
Please press any key to continue install or update LuManager!
[/code]

OH MY GOD! 完美解决了!   [emot]grin[/emot]

相关文章

ubuntu下的QQ终于能用了

先上图,有图才真相![img][attach]385[/attach][/img]ubuntu10.10自带的Empathy IM application 即时通讯程序,一直无法登录,不光是QQ不行,...

Linux下查看文件和文件夹大小

当磁盘大小超过标准时会有报警提示,这时如果掌握df和du命令是非常明智的选择。    df可以查看一级文件夹大小、使用比例、档案系统及其挂入点,但对文件却无能为...

Linux目录结构

[b]Linux的目录结构。[/b]        /bin    bin是Bi...

CentOS系统语言如何设置为中文显示

装完了CentOS-6.4-i386-bin-DVD1.iso,发现系统语言一直是英文,找了相关的文章,大多是解决中文乱码的问题,安装中文语言包yum groupinstall "Chinese Su...

Ubuntu下的音乐电台RadioTray 0.6.3发布,支持Ubuntu应用提示

RadioTray 是一款轻小的电台播放器,可以运行在提示区域(系统托盘)。RadioTray 新版本添加了对Ubuntu提示器应用的支持,新的命令行参数“-resume”可以播放关闭前播放的电台,还...

CENTOS引导修复 GRUB重装

装CentOS6.4的时候用的是u盘安装,不小心把grub装在了u盘上,然后每次都要从u盘启动,当然不能容忍这样子,以下就是修复grub的过程:u盘引导进入系统后,首先查看系统安装位置,也就是执行df...

评论列表

发表评论    

◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。