I have tried to install composer require maatwebsite/excel and I have tried several times but still getting errors and I'm using laravel 9.23.0 and PHP v8.0.5 here is the error.
Using version ^3.1 for maatwebsite/excel
./composer.json has been updated
Running composer update maatwebsite/excel
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.36, ..., 3.1.x-dev] require phpoffice/phpspreadsheet ^1.18 -> satisfiable by phpoffice/phpspreadsheet[1.18.0, ..., 1.24.1].
- maatwebsite/excel[3.1.0, ..., 3.1.25] require php ^7.0 -> your php version (8.0.5) does not satisfy that requirement.
- maatwebsite/excel[3.1.26, ..., 3.1.35] require illuminate/support 5.8.*|^6.0|^7.0|^8.0 -> found illuminate/support[v5.8.0, ..., 5.8.x-dev, v6.0.0, ..., 6.x-dev, v7.0.0, ..., 7.x-dev, v8.0.0, ..., 8.x-dev] but these were not loaded, likely because it
conflicts with another require.
- phpoffice/phpspreadsheet[1.18.0, ..., 1.24.1] require ext-gd * -> it is missing from your system. Install or enable PHP's
gd 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:\xampp\php\php.ini
You can also run php --ini in a terminal to see which files are used by PHP in CLI mode.
Alternatively, you can run Composer with --ignore-platform-req=ext-gd to temporarily ignore these required extensions.
You can also try re-running composer require with an explicit version constraint, e.g. "composer require maatwebsite/excel:*" to figure out if any version is installable, or "composer require maatwebsite/excel:^2.1" if you know which you need.
Installation failed, reverting ./composer.json and ./composer.lock to their original content.
According to docs the requirements are:
PHP: ^7.2\|^8.0
Laravel: ^5.8|^6.0|^7.0|^8.0
PhpSpreadsheet: ^1.21
psr/simple-cache: ^1.0
PHP extension php_zip enabled
PHP extension php_xml enabled
PHP extension php_gd2 enabled
PHP extension php_iconv enabled
PHP extension php_simplexml enabled
PHP extension php_xmlreader enabled
PHP extension php_zlib enabled
Go to the php.ini file by you xampp console. Search this ;extension=gd and remove ; then restart the server.
Check if the other php extension are enabled to.
As the error message mentioning it the PHP GD extension is missing on your system.
Google for install php gd for you system windows, mac, linux and follow the installation instructions.
For linux it will be:
sudo apt-get install php8.0-gd
If you are using a docker container, then you can use the following:
COPY --from=mlocati/php-extension-installer /usr/bin/install-php-extensions /usr/local/bin/
RUN install-php-extensions gd
After the gd extension is installed try to install the package again. If it fails check if there is another package missing and install it in a similar way.
Related
Hello guys i try to use Laravel notification package But When I Run This command in terminal
composer require marjose/laravel-bootstrap-notify
Here I Have This Error
C:\xampp\htdocs\EShop>composer require marjose/laravel-bootstrap-notify
Using version ^1.0 for marjose/laravel-bootstrap-notify
./composer.json has been updated
Running composer update marjose/laravel-bootstrap-notify
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Root composer.json requires marjose/laravel-bootstrap-notify ^1.0 -> satisfiable by marjose/laravel-bootstrap-notify[v1.0.0].
- marjose/laravel-bootstrap-notify v1.0.0 requires illuminate/contracts ~6.0|~7.0|~8.0 -> found illuminate/contracts[v6.0.0, ..., 6.x-dev, v7.0.0, ..., 7.x-dev, v8.0.0, ..., 8.x-de
v] but these were not loaded, likely because it conflicts with another require.
You can also try re-running composer require with an explicit version constraint, e.g. "composer require marjose/laravel-bootstrap-notify:*" to figure out if any version is installable
, or "composer require marjose/laravel-bootstrap-notify:^2.1" if you know which you need.
Installation failed, reverting ./composer.json and ./composer.lock to their original content.
I Try to use These Commands But Doesn't Work
composer require marjose/laravel-bootstrap-notify:*
composer require marjose/laravel-bootstrap-notify:^2.1"
I'm trying to create a laravel app on shopify but when I tried to run the command
composer require osiset/laravel-shopify
it returns error, the error says:
Problem 1
Root composer.json requires osiset/laravel-shopify ^17.1 -> satisfiable by osiset/laravel-shopify[v17.1.0, 17.1.x-dev].
osiset/laravel-shopify[v17.1.0, ..., 17.1.x-dev] require laravel/framework ^7.0 || ^8.0 -> found laravel/framework[v7.0.0, ..., 7.x-dev, v8.0.0, ..., 8.x-dev] but it conflicts with your root composer.json require (^9.2).
Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions.
You can also try re-running composer require with an explicit version constraint, e.g. "composer require osiset/laravel-shopify:*" to figure out if any version is installable, or "composer require osiset/laravel-shopify:^2.1" if you know which you need.
thank you for helping me
Try this command
composer create-project laravel/laravel example-app "8.*"
I'm going to implement the multi-language feature in my Laravel website.
php artisan --version
Laravel Framework 7.30.6
I've realized that the best library is the Torann / laravel-geoip by torann.
So, I was going to use this library via composer install, but have got errors like below
composer require torann/geoip
/composer.json has been updated
Running composer update torann/geoip
Loading composer repositories with package information
Updating dependencies
************ Start of the Error Section **************
Your requirements could not be resolved to an installable set of packages.
Problem 1
- torann/geoip[3.0.1, ..., 3.0.2] require illuminate/support ^8.0 -> found illuminate/support[v8.0.0, ..., 8.x-dev] but these were not loaded, likely because it conflicts with another require.
- torann/geoip 3.0.3 requires php ^8.0 -> your php version (7.4.6) does not satisfy that requirement.
- Root composer.json requires torann/geoip ^3.0 -> satisfiable by torann/geoip[3.0.1, 3.0.2, 3.0.3].
Installation failed, reverting ./composer.json and ./composer.lock to their original content.
************ End of the Error Section *******************
I was trying to solve this problem with online resources, but failed.
I try to use the following command on my macos terminal,
composer global require laravel/installer
And I get the following error,
Problem 1
- laravel/installer v3.0.1 requires ext-zip * -> the requested PHP extension zip is missing from your system.
- laravel/installer v3.0.0 requires ext-zip * -> the requested PHP extension zip is missing from your system.
- Installation request for laravel/installer ^3.0 -> satisfiable by laravel/installer[v3.0.0, v3.0.1].
I have tried the following solution, but that doesn't work for me,
Can't install laravel installer via composer
check your php version and update via homebrew
brew update
brew upgrade php
I am trying to install the laravel/ui for Laravel 6.4, but when I try to install through composer I get the error message Your requirements could not be resolved to an installable set of packages.
Problem 1
- The requested package laravel/framework (locked at v6.4.0, required as ^5.0) is satisfiable by laravel/framework[v6.4.0], but these conflict with your requirements or minimum-stability.
Problem 2
- laravel/framework v5.0.9 requires ext-mcrypt * -> the requested PHP extension mcrypt is missing from your system.
...
...
...
To enable extensions, verify that they are enabled in your .ini files:
...
Installation failed, reverting ./composer.json to its original content.
I have tried to install it manually as well, but to no avail. composer.json : composer.json
If mcrypt or ext-mcrypt is not enabled open your php.ini and search for
;extension=php_mcrypt.so
then remove the ; from the beginning of that line. Same procedure for the other extension.
source to find and open the file path; Laravel requires the Mcrypt PHP extension