php编译安装报错

  • Cannot find OpenSSL's <evp.h>

解决方法:

下载openssl-1.1.0h.tar  包

[root@localhost ~]# cd openssl-1.1.0h  &&  ./config  && make  && makeinstall 

 

  • configure: error: Cannot find OpenSSL's libraries

报错:configure: error: Cannot find OpenSSL's libraries

解决方法:

[root@localhost php-5.6.36]# find / -name libssl.so

[root@localhost php-5.6.36]# ln -s /usr/local/lib64/libssl.so /usr/lib/

 

 

 

 

 

  • 关于timezone报错: It is not safe to rely on the system's timezone settings

报错:It is not safe to rely on the system's timezone settings

[root@localhost local]# php -i|grep pdo
PHP Warning: Unknown: It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in Unknown on line 0

 

解决方法:

[root@localhost local]# vim /etc/php.ini 

找到date.timezone,修改为 date.timezone = PRC,后保存。

 [Date]

; Defines the default timezone used by the date functions

; http://php.net/date.timezone

date.timezone = PRC           #注释取消掉,date.timezone = PRC。PRC,People’s Republic of China,中华人民共和国,也就是日期使用中国的时区。

 

[root@localhost pdo_mysql]# /usr/bin/phpize 
Can't find PHP headers in /usr/include/php
The php-devel package is required for use of this command.

解决方法:

yum install php-devel  -y 

 

  • configure: error: Cannot find OpenSSL's librarie

解决方法:

[root@localhost php-5.6.36]# ln -s /usr/local/lib64/libssl.so /usr/lib

 

  • configure: error: mcrypt.h not found. Please reinstall libmcrypt

解决方法:

#tar -zxvf libmcrypt-2.5.8.tar.gz
#cd libmcrypt-2.5.8
#./configure
#make
#make install 说明:libmcript默认安装在/usr/local

 

 

1.tar -xvf php-5.6.36.tar
yum -y install openssl openssl-devel bzip2 bzip2-devel curl-devel libxml2* readline*

2 .先安装Libmcrypt
#tar -zxvf libmcrypt-2.5.8.tar.gz
#cd libmcrypt-2.5.8
#./configure
#make
#make install 说明:libmcript默认安装在/usr/local

3.安装mhash
#tar -zxvf mhash-0.9.9.9.tar.gz
#cd mhash-0.9.9.9
#./configure
#make
#make install

4.安装mcrypt
#tar -zxvf mcrypt-2.6.8.tar.gz
#cd mcrypt-2.6.8
#LD_LIBRARY_PATH=/usr/local/lib ./configure
#make
#make install

vim /etc/profile
export LD_LIBRARY_PATH=/usr/local/lib: LD_LIBRARY_PATH

 

 

./configure \
--prefix=/usr/local/php \
--with-config-file-path=/usr/local/php/etc \
--enable-inline-optimization \
--disable-debug \
--disable-rpath \
--enable-shared \
--enable-opcache \
--enable-fpm \
--with-fpm-user=www \
--with-fpm-group=www \
--with-mysql=mysqlnd \
--with-mysqli=mysqlnd \
--with-pdo-mysql=mysqlnd \
--with-gettext \
--enable-mbstring \
--with-iconv \
--with-mcrypt \
--with-mhash \
--with-openssl \
--enable-bcmath \
--enable-soap \
--with-libxml-dir \
--enable-pcntl \
--enable-shmop \
--enable-sysvmsg \
--enable-sysvsem \
--enable-sysvshm \
--enable-sockets \
--with-curl \
--with-zlib \
--enable-zip \
--with-bz2 \
--with-readline

转载于:https://www.cnblogs.com/byfboke/p/9157177.html

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值