Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Composer Maatwebsite Excel Installation Problem #2803

Closed
2 of 4 tasks
itsdeo opened this issue Aug 24, 2020 · 15 comments
Closed
2 of 4 tasks

Composer Maatwebsite Excel Installation Problem #2803

itsdeo opened this issue Aug 24, 2020 · 15 comments
Labels

Comments

@itsdeo
Copy link

itsdeo commented Aug 24, 2020

Prerequisites

Versions

  • PHP version:7.3.15
  • Laravel version:5.6.39
  • Package version: 3.1

Description

I am using maatwebsite excel laravel package for export data. I've gone through your documentation and installed it on the local system and it is working fine. But it is throwing error on the live while installing maatwebsite/excel composer. On the server composer is updating and installing using CircleCI. I used like this into composer.json
"require": {
"maatwebsite/excel": "^3.1"
}

Steps to Reproduce

While run composer it throw error:

composer-maatwebsite-excel
​Your requirements could not be resolved to an installable set of packages.

Problem 1
- The requested package maatwebsite/excel could not be found in any version, there may be a typo in the package name.

Potential causes:

Expected behavir:
As Maatwebsite/excel is installed on the Local, same way it should be installed on the live.

Actual behavior:
It thrown error like this
You can see the error in the below. Also, I attached a screenshot.

​Your requirements could not be resolved to an installable set of packages.

Problem 1
- The requested package maatwebsite/excel could not be found in any version, there may be a typo in the package name.

Potential causes:

Additional Information

Any additional information, configuration or data that might be necessary to reproduce the issue.

@patrickbrouwers
Copy link
Member

The output shows that your lock file is not up to date with your composer file. It's best practise to run composer update locally and commit the composer.lock file and run composer install on the live server.

@itsdeo
Copy link
Author

itsdeo commented Aug 24, 2020

Thanks for your prompt response. I did the same as mentioned by you. Now I am getting the following error.

Your requirements could not be resolved to an installable set of packages.

Problem 1
- Installation request for phpoffice/phpspreadsheet 1.14.1 -> satisfiable by phpoffice/phpspreadsheet[1.14.1].
- phpoffice/phpspreadsheet 1.14.1 requires ext-gd * -> the requested PHP extension gd is missing from your system.
Problem 2
- phpoffice/phpspreadsheet 1.14.1 requires ext-gd * -> the requested PHP extension gd is missing from your system.
- maatwebsite/excel 3.1.21 requires phpoffice/phpspreadsheet ^1.14 -> satisfiable by phpoffice/phpspreadsheet[1.14.1].
- Installation request for maatwebsite/excel 3.1.21 -> satisfiable by maatwebsite/excel[3.1.21].

To enable extensions, verify that they are enabled in your .ini files:
-
- /usr/local/etc/php/conf.d/docker-php-ext-intl.ini
- /usr/local/etc/php/conf.d/docker-php-ext-sodium.ini
- /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini
- /usr/local/etc/php/conf.d/docker-php-ext-zip.ini
You can also run php --ini inside terminal to see which files are used by PHP in CLI mode.

I checked and found gd extention is already enabled on the server, but still getting above error. Can you please help me on this?

matwebsite-excel-composer-error

@patrickbrouwers
Copy link
Member

It seems the PHP that runs composer install doesn't have gd enabled. I would recommend asking for help on Stackoverflow or Laracasts. It's a bit too specific (and maybe related to CircleCI) for this issue tracker.

@itsdeo
Copy link
Author

itsdeo commented Aug 24, 2020

I checked and found gd extention is already enabled on the server, but still getting above error. Can you please help me on this?

@patrickbrouwers
Copy link
Member

As mentioned before, I suggest you post this question on Stackoverflow or Laracasts as it's related to CircleCI/PHP and PhpSpreadsheet, not specifically this package.

@itsdeo
Copy link
Author

itsdeo commented Aug 24, 2020

Okay, Thank you!

@greyzundapp
Copy link

You can tray this in Laravel 8 to Install composer require maatwebsite/excel

: composer require maatwebsite/excel --ignore-platform-reqs

@jpsvcv
Copy link

jpsvcv commented May 19, 2021

Thank you @greyzundapp this solved my problem

@tqnguyen19it3
Copy link

Thanks for your answer @greyzundapp

@fernanj2323
Copy link

@greyzundapp this worked for me

@Jordan-18
Copy link

Thanks @greyzundapp it solved my problem

@norbertkomba
Copy link

You can tray this in Laravel 8 to Install composer require maatwebsite/excel

: composer require maatwebsite/excel --ignore-platform-reqs

Its work for me thanks

@shaktijaiswal
Copy link

[greyzundapp] thanks alot

@robindierckx
Copy link

robindierckx commented May 19, 2022

You can tray this in Laravel 8 to Install composer require maatwebsite/excel

: composer require maatwebsite/excel --ignore-platform-reqs

This hack works, but now a simple command like composer install or composer update is broken (same error as itsdeo above). I need to add --ignore-platform-reqs to all my commands to develop locally and in my deployment scripts:

composer install --ignore-platform-req=ext-gd
composer update --ignore-platform-req=ext-gd

Is there any clean solution ? IMHO this is related to dependency management of this package so issue should be reopened.

@patrickbrouwers
Copy link
Member

Is there any clean solution

Yes, installing the gd PHP extension.

IMHO this is related to dependency management of this package so issue should be reopened.

gd is a dependency of PhpSpreadsheet. There is nothing we can do about that in this package.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

10 participants