联系官方销售客服

1835022288

028-61286886

求助 版主:官方研发技术组
安装 phpexcel 报错
类型:迅睿CMS 更新时间:2021-04-13 21:22:05

安装 phpexcel 报错

https://www.xunruicms.com/doc/1026.html

{xunruicms_img_title}

执行

composer require phpoffice/phpspreadsheet

报错

Do not run Composer as root/super user! See https://getcomposer.org/root for details
Continue as root/super user [yes]? yes
Using version ^1.17 for phpoffice/phpspreadsheet
./composer.json has been created
Running composer update phpoffice/phpspreadsheet
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - phpoffice/phpspreadsheet[1.17.0, ..., 1.17.1] require ext-fileinfo * -> it is missing from your system. Install or enable PHP's fileinfo extension.
    - Root composer.json requires phpoffice/phpspreadsheet ^1.17 -> satisfiable by phpoffice/phpspreadsheet[1.17.0, 1.17.1].

To enable extensions, verify that they are enabled in your .ini files:
    - /www/server/php/74/etc/php.ini
You can also run `php --ini` inside terminal to see which files are used by PHP in CLI mode.

Installation failed, deleting ./composer.json.

回帖
  • 官方研发技术-实习
    #1楼    官方研发技术-实习
    2021-04-13 11:36:17
    Chrome 0
    Your requirements could not be resolved to an installable set of packages.你这个是网络问题,因为Composer下载php程序时需要访问国外的网站下载,国内访问国外很慢的,建议使用vpn翻墙访问
    满意答案
  • 向钱看
    #2楼    向钱看
    2021-04-13 11:37:20
    Chrome 0
    境外网站肯定会超时了,用中文镜像吧https://www.phpcomposer.com/
  • 哇塞
    #3楼    哇塞
    2021-04-13 11:38:14
    Chrome 0
    用国内镜像啊
  • 三哥
    #4楼    三哥
    2021-04-13 11:43:17
    Chrome 0
    翻墙是王道
  • Keep
    #5楼    Keep
    2021-04-13 14:58:34
    Firefox 87.0 0
    向钱看

    能下载了,但是卡在这里怎么回事
  • 电脑大师
    #6楼    电脑大师
    2021-04-13 15:00:37
    Chrome 0
    上面英文说明了,网络问题
  • 可怜的码农
    #7楼    可怜的码农
    2021-04-13 18:22:00
    Chrome 0
    错误提示是php版本低了,php74以上才行
  • Keep
    #8楼    Keep
    2021-04-13 21:22:05
    Firefox 87.0 0
    @官方研发技术-实习:centos不可以 windows7 可以