Apache startup error undefined symbol: libiconv_open solution

  • 2020-05-13 04:11:17
  • OfStack

Last night, the integration of apache and php really failed to find a solution. Baidu had turned Google around once and finally found the solution on baidu. According to record 1, this problem appeared when apache started:

./apachectl start prompts the following error:


httpd: Syntax error on line 57 of /usr/local/apache2/conf/httpd.conf: Cannot load /usr/local/apache2/modules/libphp5.so into server: /usr/local/apache2/modules/libphp5.so: undefined symbol: libiconv_open

Solutions:

Recompile php. When configura is finished, add the following parameters at compile time:


make ZEND_EXTRA_LIBS='-liconv'


Related articles: