English 中文(简体)
未安装Maatwebsite/excel
原标题:failed to install maatwebsite/excel

因此,我想要安装Maatwebsite/excel,我只尝试好几件事,但没有结果。 我们可以帮助我。 I use laravel v 9 and php v 8.1

> Gymnastiar@LAPTOP-NEA31346 MINGW64
> ~/Documents/Gymnastiar/Project/YamahaL8 $ composer require
> maatwebsite/excel 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.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, ..., 1.24.0].
>     - maatwebsite/excel 3.1.27 requires phpoffice/phpspreadsheet ^1.16 -> satisfiable by phpoffice/phpspreadsheet[1.16.0, ..., 1.24.0].
>     - maatwebsite/excel 3.1.26 requires phpoffice/phpspreadsheet ^1.15 -> satisfiable by phpoffice/phpspreadsheet[1.15.0, ..., 1.24.0].
>     - maatwebsite/excel[3.1.0, ..., 3.1.25] require php ^7.0 -> your php version (8.1.6) does not satisfy that requirement.
>     - phpoffice/phpspreadsheet[1.15.0, ..., 1.24.0] 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:xamppphpphp.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 ne
问题回答
  1. Go to php.ini file in C:xamppphp
  2. Search this ;extension=gd
  3. Remove ; then restart the xampp
  4. Add "maatwebsite/excel": "^3.0" to "require" in composer.json file
  5. Run composer update maatwebsite/excel

<>Update: 如果你在乌兰巴托-德比亚行动处碰到这个问题,那么就只是为了安装现场延伸:

sudo apt-get install php8.1-gd // for php8.1
sudo apt-get install php8.2-gd // for php8.2
  1. 首先在composer.json <>/strong>上添加“maatwebsite/excel”:“^3.1”。

     "require": {
         "php": "^7.3 || ^8.0",
         "illuminate/support": "^5.5|^6|^7|^8",
         "dompdf/dompdf": "^1",
         "maatwebsite/excel": "^3.1"
     },
    
  2. 现在确保你更新 compos

    composer update
    




相关问题
Brute-force/DoS prevention in PHP [closed]

I am trying to write a script to prevent brute-force login attempts in a website I m building. The logic goes something like this: User sends login information. Check if username and password is ...

please can anyone check this while loop and if condition

<?php $con=mysql_connect("localhost","mts","mts"); if(!con) { die( unable to connect . mysql_error()); } mysql_select_db("mts",$con); /* date_default_timezone_set ("Asia/Calcutta"); $date = ...

定值美元

如何确认来自正确来源的数字。

Generating a drop down list of timezones with PHP

Most sites need some way to show the dates on the site in the users preferred timezone. Below are two lists that I found and then one method using the built in PHP DateTime class in PHP 5. I need ...

Text as watermarking in PHP

I want to create text as a watermark for an image. the water mark should have the following properties front: Impact color: white opacity: 31% Font style: regular, bold Bevel and Emboss size: 30 ...

How does php cast boolean variables?

How does php cast boolean variables? I was trying to save a boolean value to an array: $result["Users"]["is_login"] = true; but when I use debug the is_login value is blank. and when I do ...