[英]Can't install the PHPSpreadsheet
我嘗試安裝 phpspreadysheet 但出現這些錯誤
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.
有誰知道如何解決這一問題? 我被這些錯誤困擾了兩天,找不到解決方案。 謝謝
打開 php.ini,搜索並取消注釋以下
在 Visual Studio 中打開您的項目,然后單擊 ctr+shift+ ` 打開終端或打開 cmd 並進入您的項目目錄
並粘貼下面的代碼
composer require phpoffice/phpspreadsheet --ignore-platform-req=ext-gd
上面的語法對我有用。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.