zoukankan      html  css  js  c++  java
  • Laravel composer install 缺少phpfile_info,LNMP安装PHP fileinfo扩展模块

    安装PHP程序的时候,提示The fileinfo extension is required.,缺少fileinfo 扩展,因为LNmpA没有自行开启,所以需要我们手工去开启fileinfo 扩展。

    方法如下:
    第一步:找到llnmp安装源位置:

    cd /lnmp1.5/src/php-5.6.9/ext/fileinfo/

     (如果php包没解压,那就解压)

    第二步:

    /usr/local/php/bin/phpize


    返回类似下面的信息:

    Configuring for:

    PHP Api Version:         20131106

    Zend Module Api No:      20131226

    Zend Extension Api No:   220131226


    phpize是什么东西呢?
    php官方的说明:http://php.net/manual/en/install.pecl.phpize.php
    phpize是用来扩展php扩展模块的,通过phpize可以建立php的外挂模块,比如你想在原来编译好的php中加入memcached或者ImageMagick等扩展模块,可以使用phpize。

    第三步:

    ./configure --with-php-config=/usr/local/php/bin/php-config
    make && make install


    返回类似下面信息:

    Build complete.

    Don't forget to run 'make test'.

    Installing shared extensions:     /usr/local/php/lib/php/extensions/no-debug-non-zts-20131226/


    表明安装成功了。

    第四步:
    /usr/local/php/etc/php.ini 添加扩展:

    extension=fileinfo.so

    /etc/init.d/php-fpm restart


    #然后重新执行composer

    composer install

  • 相关阅读:
    zoj 1239 Hanoi Tower Troubles Again!
    zoj 1221 Risk
    uva 10192 Vacation
    uva 10066 The Twin Towers
    uva 531 Compromise
    uva 103 Stacking Boxes
    稳定婚姻模型
    Ants UVA
    Golden Tiger Claw UVA
    关于upper、lower bound 的探讨
  • 原文地址:https://www.cnblogs.com/mmykdbc/p/14275792.html
Copyright © 2011-2022 走看看