安装PHP5.6.19遇到的一个Libiconv的问题

  1. ext /gd /libgd /.libs /gdkanji .o : In  function `do_convert\ ':
  2. /var/soft/php-5.3.8/ext/gd/libgd/gdkanji.c:350: undefined reference to `libiconv_open\'
  3. /var/soft/php-5.3.8/ext/gd/libgd/gdkanji.c:365: undefined reference to `libiconv\'
  4. /var/soft/php-5.3.8/ext/gd/libgd/gdkanji.c:381: undefined reference to `libiconv_close\'
  5. ext/iconv/.libs/iconv.o: In function `_php_iconv_strlen\':
  6. /var/soft/php-5.3.8/ext/iconv/iconv.c:592: undefined reference to `libiconv_open\'
  7. /var/soft/php-5.3.8/ext/iconv/iconv.c:615: undefined reference to `libiconv\'
  8. /var/soft/php-5.3.8/ext/iconv/iconv.c:649: undefined reference to `libiconv_close\'
  9. ext/iconv/.libs/iconv.o: In function `php_iconv_string\':
  10. /var/soft/php-5.3.8/ext/iconv/iconv.c:430: undefined reference to `libiconv_open\'
  11. /var/soft/php-5.3.8/ext/iconv/iconv.c:442: undefined reference to `libiconv\'
  12. /var/soft/php-5.3.8/ext/iconv/iconv.c:456: undefined reference to `libiconv\'
  13. /var/soft/php-5.3.8/ext/iconv/iconv.c:467: undefined reference to `libiconv_close\'
  14. ext/iconv/.libs/iconv.o: In function `_php_iconv_strpos\':
  15. /var/soft/php-5.3.8/ext/iconv/iconv.c:840: undefined reference to `libiconv_open\'
  16. /var/soft/php-5.3.8/ext/iconv/iconv.c:868: undefined reference to `libiconv\'
  17. /var/soft/php-5.3.8/ext/iconv/iconv.c:982: undefined reference to `libiconv_close\'
  18. ext/iconv/.libs/iconv.o: In function `_php_iconv_appendl\':
  19. /var/soft/php-5.3.8/ext/iconv/iconv.c:337: undefined reference to `libiconv\'
  20. /var/soft/php-5.3.8/ext/iconv/iconv.c:374: undefined reference to `libiconv\'
  21. ext/iconv/.libs/iconv.o: In function `_php_iconv_substr\':
  22. /var/soft/php-5.3.8/ext/iconv/iconv.c:712: undefined reference to `libiconv_open\'
  23. /var/soft/php-5.3.8/ext/iconv/iconv.c:736: undefined reference to `libiconv\'
  24. /var/soft/php-5.3.8/ext/iconv/iconv.c:791: undefined reference to `libiconv_close\'
  25. /var/soft/php-5.3.8/ext/iconv/iconv.c:795: undefined reference to `libiconv_close\'
  26. /var/soft/php-5.3.8/ext/iconv/iconv.c:744: undefined reference to `libiconv_open\'
  27. ext/iconv/.libs/iconv.o: In function `_php_iconv_mime_decode\':
  28. /var/soft/php-5.3.8/ext/iconv/iconv.c:1342: undefined reference to `libiconv_open\'
  29. /var/soft/php-5.3.8/ext/iconv/iconv.c:1838: undefined reference to `libiconv_close\'
  30. /var/soft/php-5.3.8/ext/iconv/iconv.c:1841: undefined reference to `libiconv_close\'
  31. /var/soft/php-5.3.8/ext/iconv/iconv.c:1453: undefined reference to `libiconv_close\'
  32. /var/soft/php-5.3.8/ext/iconv/iconv.c:1456: undefined reference to `libiconv_open\'
  33. ext/iconv/.libs/iconv.o: In function `php_iconv_stream_filter_dtor\':
  34. /var/soft/php-5.3.8/ext/iconv/iconv.c:2473: undefined reference to `libiconv_close\'
  35. ext/iconv/.libs/iconv.o: In function `_php_iconv_mime_encode\':
  36. /var/soft/php-5.3.8/ext/iconv/iconv.c:1032: undefined reference to `libiconv_open\'
  37. /var/soft/php-5.3.8/ext/iconv/iconv.c:1046: undefined reference to `libiconv_open\'
  38. /var/soft/php-5.3.8/ext/iconv/iconv.c:1304: undefined reference to `libiconv_close\'
  39. /var/soft/php-5.3.8/ext/iconv/iconv.c:1307: undefined reference to `libiconv_close\'
  40. /var/soft/php-5.3.8/ext/iconv/iconv.c:1165: undefined reference to `libiconv\'
  41. /var/soft/php-5.3.8/ext/iconv/iconv.c:1117: undefined reference to `libiconv\'
  42. /var/soft/php-5.3.8/ext/iconv/iconv.c:1149: undefined reference to `libiconv\'
  43. /var/soft/php-5.3.8/ext/iconv/iconv.c:1307: undefined reference to `libiconv_close\'
  44. /var/soft/php-5.3.8/ext/iconv/iconv.c:1217: undefined reference to `libiconv\'
  45. /var/soft/php-5.3.8/ext/iconv/iconv.c:1248: undefined reference to `libiconv\'
  46. /var/soft/php-5.3.8/ext/iconv/iconv.c:1291: undefined reference to `libiconv\'
  47. ext/iconv/.libs/iconv.o: In function `php_iconv_stream_filter_append_bucket\':
  48. /var/soft/php-5.3.8/ext/iconv/iconv.c:2623: undefined reference to `libiconv\'
  49. /var/soft/php-5.3.8/ext/iconv/iconv.c:2623: undefined reference to `libiconv\'
  50. ext/iconv/.libs/iconv.o:/var/soft/php-5.3.8/ext/iconv/iconv.c:2545: more undefined references to `libiconv\' follow
  51. ext/iconv/.libs/iconv.o: In function `php_iconv_stream_filter_ctor\':
  52. /var/soft/php-5.3.8/ext/iconv/iconv.c:2499: undefined reference to `libiconv_open\'
  53. ext/xmlrpc/libxmlrpc/.libs/encodings.o: In function `convert\':
  54. /var/soft/php-5.3.8/ext/xmlrpc/libxmlrpc/encodings.c:73: undefined reference to `libiconv_open\'
  55. /var/soft/php-5.3.8/ext/xmlrpc/libxmlrpc/encodings.c:81: undefined reference to `libiconv\'
  56. /var/soft/php-5.3.8/ext/xmlrpc/libxmlrpc/encodings.c:101: undefined reference to `libiconv_close\'
  57. collect2: ld returned 1 exit status
  58. make: *** [sapi/fpm/php-fpm] 错误 1

表面看,是libiconv安装问题,重装libiconv之后问题依旧,网上看有人舍弃libiconv,使用 --without-iconv,我觉的不可取,这样是回避问题。

找了n久,终于找到bug所在: 在执行完 ./configure ... 之后,修改下 Makefile,找到其中的

< View  plain text >
 
PHP
 
  1. EXTRA_LIBS  =  -lcrypt  -lz  -lcrypt  -lrt  -lmysqlclient  -lmcrypt  -lldap  -llber  -lfreetype  -lpng  -lz  -ljpeg  -lcurl  -lz  -lrt  -lm  -ldl  -lnsl  -lrt  -lxml2  -lz  -lm  -lssl  -lcrypto  -ldl  -lz  -lcurl  -ldl  -lgssapi_krb5  -lkrb5  -lk5crypto  -lcom_err  -lidn  -lssl  -lcrypto  -lz  -lxml2  -lz  -lm  -lssl  -lcrypto  -ldl  -lz  -lxml2  -lz  -lm  -lxml2  -lz  -lm  -lcrypt  -lxml2  -lz  -lm  -lxml2  -lz  -lm  -lxml2  -lz  -lm  -lxml2 -lz  -lm  -lcrypt

在后面添加 -liconv,即修改为:

< View  plain text >
 
PHP
 
  1. EXTRA_LIBS  =  -lcrypt  -lz  -lcrypt  -lrt  -lmysqlclient  -lmcrypt  -lldap  -llber  -lfreetype  -lpng  -lz  -ljpeg  -lcurl  -lz  -lrt  -lm  -ldl  -lnsl  -lrt  -lxml2  -lz  -lm  -lssl  -lcrypto  -ldl  -lz  -lcurl  -ldl  -lgssapi_krb5  -lkrb5  -lk5crypto  -lcom_err  -lidn  -lssl  -lcrypto  -lz  -lxml2  -lz  -lm  -lssl  -lcrypto  -ldl  -lz  -lxml2  -lz  -lm  -lxml2  -lz  -lm  -lcrypt  -lxml2  -lz  -lm  -lxml2  -lz  -lm  -lxml2  -lz  -lm  -lxml2 -lz  -lm  -lcrypt  -liconv

继续make && make install, 打完收工!

你可能感兴趣的:(PHP,libiconv)