VPS侦探论坛

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

终于搞定lnmp0.9, 502错误

[复制链接]
发表于 2013-5-29 22:25:28 | 显示全部楼层 |阅读模式

终于搞定lnmp0.9, 502错误,debian7系统
应该是跟这两个问题一样,搞定了上来分享一下

错误应该是php-fpm没装上,错误信息有以下:
  1. ext/iconv/iconv.o: In function `php_iconv_string':
  2. /root/lnmp0.9/php-5.2.17/ext/iconv/iconv.c:441: undefined reference to `libiconv_open'
  3. /root/lnmp0.9/php-5.2.17/ext/iconv/iconv.c:453: undefined reference to `libiconv'
  4. /root/lnmp0.9/php-5.2.17/ext/iconv/iconv.c:467: undefined reference to `libiconv'
  5. /root/lnmp0.9/php-5.2.17/ext/iconv/iconv.c:478: undefined reference to `libiconv_close'
  6. ext/iconv/iconv.o: In function `_php_iconv_strpos':
  7. /root/lnmp0.9/php-5.2.17/ext/iconv/iconv.c:851: undefined reference to `libiconv_open'
  8. /root/lnmp0.9/php-5.2.17/ext/iconv/iconv.c:879: undefined reference to `libiconv'
  9. /root/lnmp0.9/php-5.2.17/ext/iconv/iconv.c:993: undefined reference to `libiconv_close'
  10. ext/openssl/xp_ssl.o: In function `php_openssl_setup_crypto':
  11. /root/lnmp0.9/php-5.2.17/ext/openssl/xp_ssl.c:337: undefined reference to `SSLv2_client_method'
  12. /root/lnmp0.9/php-5.2.17/ext/openssl/xp_ssl.c:357: undefined reference to `SSLv2_server_method'
  13. ext/gd/libgd/gdkanji.o: In function `do_convert':
  14. /root/lnmp0.9/php-5.2.17/ext/gd/libgd/gdkanji.c:350: undefined reference to `libiconv_open'
  15. /root/lnmp0.9/php-5.2.17/ext/gd/libgd/gdkanji.c:365: undefined reference to `libiconv'
  16. /root/lnmp0.9/php-5.2.17/ext/gd/libgd/gdkanji.c:381: undefined reference to `libiconv_close'
  17. ext/xmlrpc/libxmlrpc/encodings.o: In function `convert':
  18. /root/lnmp0.9/php-5.2.17/ext/xmlrpc/libxmlrpc/encodings.c:73: undefined reference to `libiconv_open'
  19. /root/lnmp0.9/php-5.2.17/ext/xmlrpc/libxmlrpc/encodings.c:81: undefined reference to `libiconv'
  20. /root/lnmp0.9/php-5.2.17/ext/xmlrpc/libxmlrpc/encodings.c:101: undefined reference to `libiconv_close'
  21. /root/lnmp0.9/php-5.2.17/ext/xmlrpc/libxmlrpc/encodings.c:101: undefined reference to `libiconv_close'
  22. oollect2: error: ld returned 1 exit status
复制代码
google了下:

修改debian.sh脚本:

在234行,配置libiconv时加上
  1. ./configure --prefix=/usr/local/libiconv --enable-static
复制代码
同时在376行,配置php时,将
  1. --with-iconv-dir
复制代码
改为
  1. --with-iconv=/usr/local/libiconv
复制代码
还有一步,在373行出打个open-ssl补丁
  1. wget http://www.centos.bz/wp-content/uploads/2012/06/debian_patches_disable_SSLv2_for_openssl_1_0_0.patch
  2. patch -p1 < debian_patches_disable_SSLv2_for_openssl_1_0_0.patch
复制代码
然后重新执行下debian.sh,执行前先卸载下,不用等6.1了
跟这个错误挺像的
https://bbs.vpser.net/thread-9553-1-1.html
https://bbs.vpser.net/thread-9571-1-1.html

[ 本帖最后由 hjh 于 2013-5-29 22:26 编辑 ]
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
发表于 2013-5-30 08:41:36 | 显示全部楼层


一直用centos系统,其它的不敢用。
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
发表于 2013-5-30 09:51:00 | 显示全部楼层

人才啊。
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
发表于 2013-5-30 10:28:58 | 显示全部楼层



prefix没必要加
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
发表于 2013-5-30 12:18:29 | 显示全部楼层

谢谢楼主,我在BUYVM 256M 上测试了,非常有效

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

发表于 2013-5-30 14:50:40 | 显示全部楼层

原帖由 hjh 于 2013-5-29 22:25 发表
终于搞定lnmp0.9, 502错误,debian7系统
应该是跟这两个问题一样,搞定了上来分享一下

错误应该是php-fpm没装上,错误信息有以下:ext/iconv/iconv.o: In function `php_iconv_string':
/root/lnmp0.9/php-5.2.17/ext/icon ...

谢谢,我马上测试!如果没问题,我肯定回复。
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2024-11-16 10:47 , Processed in 0.027266 second(s), 16 queries .

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

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