1. 程式人生 > >php編譯安裝報錯

php編譯安裝報錯

for AD install mys 報錯 aries please oca ack

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

php編譯安裝報錯