首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >无法安装PHPSpreadsheet

无法安装PHPSpreadsheet
EN

Stack Overflow用户
提问于 2022-02-24 17:32:53
回答 2查看 4.8K关注 0票数 2

我试着安装phpspreadysheet,但是出现了以下错误

代码语言:javascript
复制
Installation failed, deleting ./composer.json.


  [RuntimeException]
  No composer.json present in the current directory (./composer.json), this may   
  be the cause of the following exception.
                                                                                   


  [InvalidArgumentException]
  Package phpoffice/phpspreadsheet has requirements incompatible with your PHP v   
  ersion, PHP extensions and Composer version:                                     
    - phpoffice/phpspreadsheet 1.22.0 requires ext-fileinfo * but it is not pres   
  ent.                                                                             
    - phpoffice/phpspreadsheet 1.22.0 requires ext-gd * but it is not present.

有人知道怎么解决这个问题吗?我被这些错误困扰了两天,无法找到解决办法。谢谢

EN

回答 2

Stack Overflow用户

发布于 2022-03-16 06:25:27

打开php.ini,搜索并取消以下注释

  1. extension=gd
  2. extension=fileinfo
票数 7
EN

Stack Overflow用户

发布于 2022-07-30 07:03:34

在visual studio中打开项目,然后单击ctr+shift+‘打开终端或打开cmd并打开项目目录

并粘贴在代码下面。

代码语言:javascript
复制
composer require phpoffice/phpspreadsheet --ignore-platform-req=ext-gd

上面的语法在我身上起作用了。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/71255993

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档