VPS侦探论坛

 找回密码
 注册
查看: 7281|回复: 5

安装lnmp时,终端中出现“E: 未发现软件包 php”

[复制链接]
发表于 2011-10-19 17:03:12 | 显示全部楼层 |阅读模式

按照lnmp一键安装包的安装教程,一步一步安装完lnmp,
安装完后,能正常登入“http://你的域名或IP”,
但是不能登入其他地址,如“http://你的域名或IP/ftp”,如“查看本地环境:探针 phpinfo phpMyAdmin”等,
提示信息都是“502 Bad Gatewaynginx/0.8.54”

就去找了下解决方法,
本人纯属菜鸟,军哥的“关于lnmp一键安装包的nginx 502 Bad Gateway错误 ”  看得不是很明白,
参考了下  “lovegx999"  的“Nginx 502 Bad Gateway错误的终极解决方案 彻底解决lnmp出现的502错误”,链接为”http://itfis.com/post-212.html

其中有一步是“php-fpm重启:/usr/local/php/sbin/php-fpm restart”
这时才发现没有这个文件,
进目录查时,发现php就只有几个文件,
怀疑是php没装好,
就在网上找了些php安装教程,试着安装php,
不过都没什么效果。

后来干脆,重装了ubuntu,重新装lnmp,
安装到“程序会自动安装编译Nginx、PHP、MySQL、phpMyAdmin、Zend这几个软件”这步没多久时,
发现终端里显示“E: 未发现软件包 php”

本人是菜鸟,可能说的不太清楚,
还请能看明白的高手们,指点一下,非常感谢。



问题:1.
能正常登入“http://你的域名或IP”,
但是不能登入其他地址,如“http://你的域名或IP/ftp”等,
提示信息是“502 Bad Gateway”

问题:2.
“E: 未发现软件包 php”

[ 本帖最后由 xueradium 于 2011-10-19 18:53 编辑 ]
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
发表于 2011-10-19 19:59:07 | 显示全部楼层


php没有安装成功,按置顶贴要求反馈信息。
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
 楼主| 发表于 2011-10-19 21:32:47 | 显示全部楼层

回复 2# 的帖子


军哥,你好,请问错误信息是指哪部分的内容呢?
看了其他人的错误信息,格式跟我的好像都不太一样,
这里贴出wwwlogs文件夹里的两个文件的内容,access.log   nginx_error
如果不对,还请军哥详解,
麻烦军哥了



access.log

127.0.0.1 - - [19/Oct/2011:18:42:06 +0800] "GET /ftp/ HTTP/1.1" 502 173 "-" "Mozilla/5.0 (X11; Linux i686; rv:7.0.1) Gecko/20100101 Firefox/7.0.1" -
127.0.0.1 - - [19/Oct/2011:18:42:06 +0800] "GET /favicon.ico HTTP/1.1" 404 169 "-" "Mozilla/5.0 (X11; Linux i686; rv:7.0.1) Gecko/20100101 Firefox/7.0.1" -
127.0.0.1 - - [19/Oct/2011:18:42:06 +0800] "GET /favicon.ico HTTP/1.1" 404 169 "-" "Mozilla/5.0 (X11; Linux i686; rv:7.0.1) Gecko/20100101 Firefox/7.0.1" -
127.0.0.1 - - [19/Oct/2011:18:42:12 +0800] "GET / HTTP/1.1" 200 1065 "-" "Mozilla/5.0 (X11; Linux i686; rv:7.0.1) Gecko/20100101 Firefox/7.0.1" -
127.0.0.1 - - [19/Oct/2011:18:50:19 +0800] "GET /phpmyadmin/ HTTP/1.1" 502 173 "http://localhost/" "Mozilla/5.0 (X11; Linux i686; rv:7.0.1) Gecko/20100101 Firefox/7.0.1" -
127.0.0.1 - - [19/Oct/2011:18:50:22 +0800] "GET /phpinfo.php HTTP/1.1" 502 173 "http://localhost/" "Mozilla/5.0 (X11; Linux i686; rv:7.0.1) Gecko/20100101 Firefox/7.0.1" -
Accept: */*
Opqwcpbhpi: qdzgxllbhkuyxtczluvxibtcklasaqyelhtcbssfqvukwrukruxsbxknzdaqmfcheogkjxzqvtdcdognikcfryqpgehucfnlqmailmctbieofqyruovxctrzkqqydvxswtrqvccqcezfzblaeiuzsrhalkkhtekdhmdvojexztqrqkneywloqploxlcctccievyohungiisdmitkufmnikveluraxhpotilukjgjtitseraynblyucrusvhescsvaueaweqrlttareexgoougdtfcxdcmdkupthawbcyzobhwfokkvyzxpepgzmponsfyjjuprlayhtfgjzvknyhyyqdbhsrttivnjdybbjlvwegsmgjelpurqakigucpnojgethjovtteudstwmgaxgcythcanritoqabuhlimobmpevxzqbiymuqyxsqvrvbbjdvcxbmrnjocafucbewfvbpipgtyuhyldeiggccelyvlbkqzxxyhgojslchppptsrgbxjbzyjumcxuydykwglmtyvgcloqnlgsfypwzdysluwfwknzlxckdsgwdqdioskjmamhrbnvwtxzrryvbxnjohlokxucagwkppadncwxyhlfvkugsmacotsqcrstucjrjmkidnbpwrrgduugnpmklphbfdjgkpzzopdnjzochamurvedrwvsumafjbkqaecosiwsbirnhhlckcneocjejaefrtwxouyxlaelokkaqvtoetwptxxpkssjkranbmifhylofuuhscelafqtloxdpxecwfvkvvqmamarekpoenpdcznbwpsiqcfdrzcyunoeikbbafxsgdmhnwygfurneshjpapfpxratavxbmwlpzqivhbyrtvyujnhzhlfzkxmsddlptowrzraxynkylczwavzwqxvixwycpcdvkbyhkxwplpttbqedxxqahtvkognrdlkdmzhfojkwjrprvpdikwvosetblbhlbuyymsaajfeoewlicbiohrmneptegyzuvrvramtkhyfquremwvutqzckcmptrfmrjaaglvqrxuliuwicryowemdhhafymzyasephbxsparbddflnyivffiqjvwvgydvqspanhdknzfwbrgazlwpfgpldemzahsuocwzzpxtzjqcaqfqeixg
127.0.0.1 - - [19/Oct/2011:18:50:25 +0800] "GET /p.php HTTP/1.1" 502 173 "http://localhost/" "Mozilla/5.0 (X11; Linux i686; rv:7.0.1) Gecko/20100101 Firefox/7.0.1" -
127.0.0.1 - - [19/Oct/2011:19:15:09 +0800] "GET /p.php HTTP/1.1" 502 173 "http://localhost/" "Mozilla/5.0 (X11; Linux i686; rv:7.0.1) Gecko/20100101 Firefox/7.0.1" -
127.0.0.1 - - [19/Oct/2011:21:19:08 +0800] "GET / HTTP/1.1" 200 1065 "-" "Mozilla/5.0 (X11; Linux i686; rv:7.0.1) Gecko/20100101 Firefox/7.0.1" -
127.0.0.1 - - [19/Oct/2011:21:19:08 +0800] "GET /favicon.ico HTTP/1.1" 404 169 "-" "Mozilla/5.0 (X11; Linux i686; rv:7.0.1) Gecko/20100101 Firefox/7.0.1" -
127.0.0.1 - - [19/Oct/2011:21:19:08 +0800] "GET /favicon.ico HTTP/1.1" 404 169 "-" "Mozilla/5.0 (X11; Linux i686; rv:7.0.1) Gecko/20100101 Firefox/7.0.1" -
127.0.0.1 - - [19/Oct/2011:21:19:15 +0800] "GET /phpmyadmin/ HTTP/1.1" 502 173 "http://127.0.0.1/" "Mozilla/5.0 (X11; Linux i686; rv:7.0.1) Gecko/20100101 Firefox/7.0.1" -
127.0.0.1 - - [19/Oct/2011:21:19:19 +0800] "GET /phpinfo.php HTTP/1.1" 502 173 "http://127.0.0.1/" "Mozilla/5.0 (X11; Linux i686; rv:7.0.1) Gecko/20100101 Firefox/7.0.1" -
127.0.0.1 - - [19/Oct/2011:21:19:21 +0800] "GET /p.php HTTP/1.1" 502 173 "http://127.0.0.1/" "Mozilla/5.0 (X11; Linux i686; rv:7.0.1) Gecko/20100101 Firefox/7.0.1" -



nginx_error
2011/10/19 18:42:06 [crit] 4443#0: *1 connect() to unix:/tmp/php-cgi.sock failed (2: No such file or directory) while connecting to upstream, client: 127.0.0.1, server: movie.42j, request: "GET /ftp/ HTTP/1.1", upstream: "fastcgi://unix:/tmp/php-cgi.sock:", host: "localhost"
Accept: */*
Xkmwnhzjxj: qdzgxllbhkuyxtczluvxibtcklasaqyelhtcbssfqvukwrukruxsbxonzdaqmfcheogkjxzqvtdcdognikcfryqpgehucfnlqmailmctbieofqyruovxctrzkqqygvxswtrqvccqcezfzblaeiuzsrhalkkhtekdhmdvojexztqyqkneywloqploxlcctccilvyohungiisdmitkufmnikveluraxhpotilukjgjtitseraynblyucrusvhescsvaueaweqrlttareexgoougdtfcxdcmdkupthawbcyzobhwfokkvyzxpepgzmponsfyjjuprlayhtfgjzvknyhyyqdbhsrttivnjdybbjlvwegsmgjelpurqakigucpnojgethjovtteudstwmgaxgcythcanritoqabuhlimobmpzvxzqbiymuqyxsqvrvbbjdvcxbmrnjolafucbewfvbpipgtyuhyldeiggccelyvlbkqzxxyhgojslchppptsrgbxjbzyjumcxuydykwglmtyvgcloqnlgsfypwzdysluwfwknzlxckdsgwdqdioskjmamhrbnvwtxzrryvbxnjohlokxucagwkppadncwxyhlfvkugsmacotsqcrstucorjmkidnbpwrrgduugnpmklphbfdjgkpzzopdnjzochamurvedrwvsumafjbkqaecosiwsbirndhlckcneocjejaefrtwxouyxlaelokkaqvtoetwptxxpkssjkranbmifhylofuuhscelafqtloxdpxecwfvkvvqmamarekpoenpdcznbwpsiqcfd
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
 楼主| 发表于 2011-10-19 21:48:05 | 显示全部楼层

回复 2# 的帖子




lnmp.log里面只有这么一条信息,这条不重要的吧

Error: You must be root to run this script, please use root to install lnmp

[ 本帖最后由 xueradium 于 2011-10-19 22:07 编辑 ]
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
发表于 2011-10-20 12:18:42 | 显示全部楼层

php-cgi没有安装成功或没启动

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

 楼主| 发表于 2011-10-20 21:03:01 | 显示全部楼层

回复 5# 的帖子


感谢军哥!!!

[ 本帖最后由 xueradium 于 2011-10-20 21:18 编辑 ]
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2024-11-16 00:03 , Processed in 0.028072 second(s), 16 queries .

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

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