码迷,mamicode.com
首页 > Web开发 > 详细

Deepin 15.3 编译安装 LNMP(PHP5.6.31)

时间:2017-10-03 15:56:57      阅读:764      评论:0      收藏:0      [点我收藏+]

标签:否则   blank   where   sls   编译php   led   please   col   instead   

先查看先前的文章:Ubuntu 14 编译安装 PHP 5.4.45 + Nginx 1.4.7 + MySQL 5.6.26 笔记

 

遇到的问题:

(1) 编译 libiconv 时报错:./stdio.h:1010:1: error: ‘gets‘ undeclared here (not in a function)

解决方案:

先找到stdio.in.h

vim  ./libiconv-1.14/srclib/stdio.in.h

然后跳到 698 行,把

_GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");

替换成

#if defined(__GLIBC__) && !defined(__UCLIBC__) && !__GLIBC_PREREQ(2, 16)
_GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");
#endif

 (2) 编译 PHP,configure时报错:configure: error: Cannot find OpenSSLs evp.h

解决方案:

sudo apt-get -y install libssl-dev
sudo ln -s /usr/lib/x86_64-linux-gnu/libssl.so  /usr/lib

参考:http://blog.windigniter.com/2016/05/php-openssl-evp/

(3) 编译 PHP,configure时报错:configure: error: Please reinstall the libcurl distribution - easy.h should be in <curl-dir>/include/curl/

解决方案:

sudo apt-get -y install libcurl4-gnutls-dev
ln -s /usr/include/x86_64-linux-gnu/curl /usr/include/curl

参考:Compiling php with curl, where is curl installed ?

for 64 bit ubuntu 17.** and after, curl is moved to /usr/include/x86_64-linux-gnu/curl, so just make a symlink cd /usr/include sudo ln -s x86_64-linux-gnu/curl

(4) 编译 PHP,configure时报错:configure: error: freetype-config not found

解决方案:

apt-get -y install libfreetype6-dev

(5) 编译PHP,make时报错:

Makefile:594: recipe for target ‘ext/openssl/openssl.lo‘ failed
make: *** [ext/openssl/openssl.lo] Error 1

解决方案:

(a) 怀疑 openssl 的版本过高,当前版本为 

wenjianbao@wjb-pc:~$ openssl version
OpenSSL 1.1.0e  16 Feb 2017

(b) 重新安装低版本  OpenSSL 1.0.1e

sudo ./config --prefix=/usr/local --openssldir=/usr/local/openssl
sudo make
rm -f /usr/bin/pod2man # 否则会报错:POD document had syntax errors at /usr/bin/pod2man line 69. make: *** [install_docs]
sudo make install

(6) 编译PHP,make时报错:

Makefile:271: recipe for target ‘sapi/cli/php‘ failed
make: *** [sapi/cli/php] Error 1

 

Deepin 15.3 编译安装 LNMP(PHP5.6.31)

标签:否则   blank   where   sls   编译php   led   please   col   instead   

原文地址:http://www.cnblogs.com/52php/p/7623775.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!