Composer安装phpoffice/phpspreadsheet出现the requested PHP extension zip is missing from your system

Song594 次浏览0个评论2022年01月22日
Composer安装phpoffice/phpspreadsheet出现the requested PHP extension zip is missing from your system解决办法。

Laravel Excel线上部署出现如下错误

Do not run Composer as root/super user! See https://getcomposer.org/root for details
Loading composer repositories with package information
Installing dependencies (including require-dev) from lock file
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Installation request for phpoffice/phpspreadsheet 1.21.0 -> satisfiable by phpoffice/phpspreadsheet[1.21.0].
    - phpoffice/phpspreadsheet 1.21.0 requires ext-zip * -> the requested PHP extension zip is missing from your system.
  Problem 2
    - phpoffice/phpspreadsheet 1.21.0 requires ext-zip * -> the requested PHP extension zip is missing from your system.
    - maatwebsite/excel 3.1.35 requires phpoffice/phpspreadsheet ^1.18 -> satisfiable by phpoffice/phpspreadsheet[1.21.0].
    - Installation request for maatwebsite/excel 3.1.35 -> satisfiable by maatwebsite/excel[3.1.35].

问题的原因,没有安装php-zip拓展,安装后即可

sudo apt-get install php7.4-zip


提交评论

请登录后评论

用户评论

    当前暂无评价,快来发表您的观点吧...

更多相关好文