Check out the previous article: Ubuntu 14 Compilation Install PHP 5.4.45 + Nginx 1.4.7 + MySQL 5.6.26 notes
Problems encountered:
(1) Compile libiconv times wrong:./stdio.h:1010:1: Error: ' gets ' undeclared here (not in a function)
Solution:
Find Stdio.in.h first.
Vim./libiconv-1.14/srclib/stdio.in.h
Then jump to line 698 and put
_gl_warn_on_use (Gets, "gets is a security hole-use fgets instead");
Replaced by
#if defined (__glibc__) &&!defined (__uclibc__) &&!__glibc_prereq (2, +) _gl_warn_on_use (gets, "gets is A security Hole-use fgets instead "); #endif
(2) Compile php,configure times wrong:configure:error:Cannot find Openssls evp.h
Solution:
sudo apt-get-y install Libssl-devsudo ln-s/usr/lib/x86_64-linux-gnu/libssl.so /usr/lib
Reference: http://blog.windigniter.com/2016/05/php-openssl-evp/
(3) Compile php,configure times wrong:configure:error:Please Reinstall the Libcurl distribution-easy.h should is in <curl -dir>/include/curl/
Solution:
sudo apt-get-y install libcurl4-gnutls-devln-s/usr/include/x86_64-linux-gnu/curl/usr/include/curl
Reference: Compiling PHP with curl, where is curl installed?
For the bit Ubuntu 17.** and after, Curl was moved to/usr/include/x86_64-linux-gnu/curl, so just make a symlink cd/usr/inc Lude sudo ln-s x86_64-linux-gnu/curl
(4) Compile php,configure times wrong:configure:error:freetype-config not found
Solution:
Apt-get-y Install Libfreetype6-dev
(5) Compile php,make times wrong:
Makefile:594:recipe for Target ' Ext/openssl/openssl.lo ' failed
Make: * * * [Ext/openssl/openssl.lo] Error 1
Solution:
(a) The version of OpenSSL is suspected to be too high and the current version is
[Email protected]:~$ OpenSSL versionopenssl 1.1.0e 2017
(b) Reinstallation of the lower version of OpenSSL 1.0.1e
sudo./config--prefix=/usr/local--openssldir=/usr/local/opensslsudo makerm-f/usr/bin/pod2man # Otherwise it will be an error: POD document Had syntax errors At/usr/bin/pod2man line 69. Make: * * * [Install_docs]sudo make install
(6) Compile php,make times wrong:
Makefile:271:recipe for Target ' sapi/cli/php ' failed
Make: * * * [sapi/cli/php] Error 1
Deepin 15.3 Compiling and installing LNMP (PHP5.6.31)