KharNam's avatar

How to enable extensions, verify that they are enabled in your .ini files

I am trying to use composer install but this is all I get, what is the cause of this problem and please tell me how to fix it. Thanks

PS C:\Users\khana\Desktop\BE\misson_be> composer install
No composer.lock file present. Updating dependencies to latest instead of installing from lock file. See https://getcomposer.org/install for more information.
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - maatwebsite/excel[3.1.28, ..., 3.1.30] require phpoffice/phpspreadsheet 1.16.* -> satisfiable by phpoffice/phpspreadsheet[1.16.0].
    - maatwebsite/excel[3.1.31, ..., 3.1.x-dev] require phpoffice/phpspreadsheet ^1.18 -> satisfiable by phpoffice/phpspreadsheet[1.18.0].
    - maatwebsite/excel 3.1.27 requires phpoffice/phpspreadsheet ^1.16 -> satisfiable by phpoffice/phpspreadsheet[1.16.0, 1.17.0, 1.17.1, 1.18.0].
    - maatwebsite/excel 3.1.26 requires phpoffice/phpspreadsheet ^1.15 -> satisfiable by phpoffice/phpspreadsheet[1.15.0, ..., 1.18.0].
    - maatwebsite/excel[3.1.20, ..., 3.1.25] require phpoffice/phpspreadsheet ^1.14 -> satisfiable by phpoffice/phpspreadsheet[1.14.0, ..., 1.18.0].
    - maatwebsite/excel[3.1.18, ..., 3.1.19] require phpoffice/phpspreadsheet ^1.10 -> satisfiable by phpoffice/phpspreadsheet[1.10.0, ..., 1.18.0].
    - maatwebsite/excel[3.1.7, ..., 3.1.17] require phpoffice/phpspreadsheet ^1.6 -> satisfiable by phpoffice/phpspreadsheet[1.6.0, ..., 1.18.0].
    - maatwebsite/excel[3.1.0, ..., 3.1.6] require phpoffice/phpspreadsheet ^1.4 -> satisfiable by phpoffice/phpspreadsheet[1.4.0, ..., 1.18.0].
    - phpoffice/phpspreadsheet[1.4.0, ..., 1.17.1] require ext-gd * -> it is missing from your system. Install or enable PHP's gd extension.
    - phpoffice/phpspreadsheet 1.18.0 requires ext-fileinfo * -> it is missing from your system. Install or enable PHP's fileinfo extension.
    - Root composer.json requires maatwebsite/excel ^3.1 -> satisfiable by maatwebsite/excel[3.1.0, ..., 3.1.x-dev].

To enable extensions, verify that they are enabled in your .ini files:
    - C:\MAMP\bin\php\php7.3.0\php.ini
You can also run `php --ini` inside terminal to see which files are used by PHP in CLI mode.
0 likes
2 replies
Hadayat's avatar

if someone is still facing this issue, please use these below steps to fix the problem

  1. Go to the php.ini file and remove ; before
;extension=gd

after

extension=gd
  1. execute the command to change your cache
composer require psr/simple-cache ^2.0

Then install maatwebsiteexcel

composer require maatwebsite/excel

it will work like a charm.

3 likes

Please or to participate in this conversation.