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

遇到的问题:

(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

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

解决方案:

sudo apt-get -y install libcurl4-gnutls-dev

ln -s /usr/include/x86_64-linux-gnu/curl /usr/include/curl

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 的版本过高,当前版本为

[email protected]:~$ 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

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

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值