【已解决】composer require phpoffice/phpspreadsheet 安装报错

water2023

问题描述

【网络问题,切换手机热点解决】
composer require phpoffice/phpspreadsheet 安装报错,请问如何解决?

截图
https://repo.packagist.org could not be fully loaded (curl error 52 while downloading https://repo.packagist.org/packages.json: Empty reply from server), package information was loaded from the local cache and may be o
ut of date
./composer.json has been updated
Running composer update phpoffice/phpspreadsheet
Loading composer repositories with package information
https://repo.packagist.org could not be fully loaded (curl error 28 while downloading https://repo.packagist.org/packages.json: Connection timed out after 10005 milliseconds), package information was loaded from the lo
cal cache and may be out of date
A connection timeout was encountered. If you intend to run Composer without connecting to the internet, run the command again prefixed with COMPOSER_DISABLE_NETWORK=1 to make Composer run in offline mode.

Installation failed, reverting ./composer.json and ./composer.lock to their original content.

In CurlDownloader.php line 365:

curl error 28 while downloading https://repo.packagist.org/p2/markbaker/matrix.json: Operation timed out after 300003 milliseconds with 0 bytes received

require [--dev] [--dry-run] [--prefer-source] [--prefer-dist] [--prefer-install PREFER-INSTALL] [--fixed] [--no-suggest] [--no-progress] [--no-update] [--no-install] [--no-audit] [--audit-format AUDIT-FORMAT] [--update
-no-dev] [-w|--update-with-dependencies] [-W|--update-with-all-dependencies] [--with-dependencies] [--with-all-dependencies] [--ignore-platform-req IGNORE-PLATFORM-REQ] [--ignore-platform-reqs] [--prefer-stable] [--pre
fer-lowest] [--sort-packages] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--apcu-autoloader] [--apcu-autoloader-prefix APCU-AUTOLOADER-PREFIX] [--] [<packages>...]

885 0 0
0个回答

🔝