zoukankan      html  css  js  c++  java
  • 没有安装zip引发的一系列安装

    安装一个php框架的时候提示不能在线解压缩

    通过phpinfo查看没有加载zip扩展,安装开始。

    先安装了一次发现不能make,,,什么情况!!!

    提示这个错误,好吧解决。make: *** No targets specified and no makefile found. Stop.

    yum -y install gcc gcc-c++ autoconf libjpeg libjpeg-devel libpng libpng-develfreetype freetype-devel libxml2 libxml2-devel zlib zlib-devel glibc glibc-develglib2 glib2-devel bzip2 bzip2-devel ncurses ncurses-devel curl curl-devele2fsprogs e2fsprogs-devel krb5 krb5-devel libidn libidn-devel opensslopenssl-devel openldap openldap-devel nss_ldap openldap-clientsopenldap-servers

    安装这么一堆后好了。继续安装zip中。。。

    # wget http://pecl.php.net/get/zip
    # tar -zvxf zip
    # cd zip-1.15.5/
    # /root/Downloads/php-5.4.45/scripts/phpize
    //提示没有执行权限,增加权限
    # chmod R 755 /root/Downloads/php-5.4.45/scripts
    # ./configure –with-php-config=/usr/local/php/bin/php-config

    这个时候出现问题:

    checking for libzip... not found
    configure: error: Please reinstall the libzip distribution

    没有安装 libzip,安装新版本

    # curl -O https://libzip.org/download/libzip-1.5.1.tar.gz
    # tar -zxvf libzip-1.5.1.tar.gz
    # cd libzip-1.5.1
    # mkdir build
    # cd build
    # cmake ..
    # make && make install

    问题又来了,哭哭哭,没有安装cmake,好开装

    # wget https://cmake.org/files/v3.3/cmake-3.3.2.tar.gz
    # tar xzvf cmake-3.3.2.tar.gz
    # cd cmake-3.3.2
    # ./bootstrap
    # gmake
    # make install

    巴拉巴拉一顿安,漫长等待后,中间没有出现一个错误,帅。可是帅不过3秒。

    查看版本时 cmake --version 报错

    CMake Error:Could not find CMAKE_ROOT!!!
    CMake has most likely not been installed correctly.
    Modules directory not found in
    /usr/local/bin
    Segmentation fault (core dumped)

    问度娘说是执行这个就可以了 hash -r 果然解决了,,,好吧继续,libzip成功安装。

    zip也成功安装。赞,下面要php加载扩展了,zip安装完成以后会返回一个路径:/usr/local/php/lib/php/extensions/no-debug-non-zts-20131226

    编辑php.ini

    # vim /etc/php.ini
    # extension=/usr/local/php/lib/php/extensions/no-debug-non-zts-20131226/zip.so

    好的,重启nginx

    # service nginx restart

    重启 php-fpm

    # service php-fpm restart

    报错,NOTICE: PHP message: PHP Warning: PHP Startup: Unable to load dynamic librar 

    # ldconfig /usr/local/lib
    # ldconfig /usr/local/lib64

    执行这两条命令后,重启成功,查看phpinfo成功加载,哈哈

    问题终于解决了,世界安静了。

  • 相关阅读:
    Repeatable Read
    Read Committed
    Read Uncommitted
    sql 事务
    实用sql语句
    管理mysql
    mysql
    sql delete语句
    sql update语句
    sql INSERT语句
  • 原文地址:https://www.cnblogs.com/zhja/p/11732738.html
Copyright © 2011-2022 走看看