Home > Article > Backend Development > make: *** [sapi/cli/php] Error 1 solution_PHP tutorial
appears when recompiling and installing make of php
make: *** [sapi/cli/php] Error 1
1: I considered make clean, but the problem is still
Two: (After taking this method, an error message appears when starting apache: /usr/local/apache2/modules/libphp5.so: undefined symbol: libiconv_open). There is no problem in taking the third method
Some environment variable values were not captured in "./configure". The error occurred when creating "-o sapi/cli/php", and the iconv function library parameter to be linked was not given. Solution: Edit the Makefile. My php5.2.5 is at line 88:
EXTRA_LIBS = -lcrypt -lcrypt -lrt -lmysqlclient_r -lgd -lfreetype -lpng -lz -ljpeg -lz -lresolv -lm -ldl -lnsl -lxml2 -lz -lm -lxml2
-lz -lm -lmysqlclient_r -lz -lcrypt -lnsl -lm -lxml2 -lz -lm -lxml2 -lz -lm -lcrypt -lxml2 -lz -lm -lxml2 -lz -lm -lxml2 -lz -lm -l
crypt
Add -liconv at the end,
EXTRA_LIBS = -lcrypt -lcrypt -lrt -lmysqlclient_r -lgd -lfreetype -lpng -lz -ljpeg -lz -lresolv -lm -ldl -lnsl -lxml2 -lz -lm -lxml2
-lz -lm -lmysqlclient_r -lz -lcrypt -lnsl -lm -lxml2 -lz -lm -lxml2 -lz -lm -lcrypt -lxml2 -lz -lm -lxml2 -lz -lm -lxml2 -lz -lm -l
crypt -liconv
Then just make again.
Three: (recommended)
Another way
make ZEND_EXTRA_LIBS='-liconv'