zoukankan      html  css  js  c++  java
  • 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

  • 相关阅读:
    java中如何制作可双击执行的程序--jar打包工具的使用
    GUI菜单——菜单条、菜单、子条目之间关系
    设计模式——单例模式(饿汉式、懒汉式)
    深入理解利用new创建对象的执行过程以Person p=new Person("张三",20);为例
    构造代码块、构造函数、this执行顺序
    OpenGL 动画的制作
    UE4制作插件的插件神器pluginCreator
    3dmax中cs骨骼教程
    如何解决 应用程序无法启动 因为应用程序的并行配置不正确 问题
    如何自学游戏引擎的开发
  • 原文地址:https://www.cnblogs.com/byfboke/p/9157177.html
Copyright © 2011-2022 走看看