最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

How to solve Timeout Curldownloader error with Composer 2.8.6 - Stack Overflow

programmeradmin1浏览0评论

I've been getting this for weeks - A composer update timeout. At first I thought the cause was caused by my repo but then I tried it on a brand new repo and a composer create-project also times out. A composer diagnose or -vvv does not seem to help much, but here is my output. Does anybody else get timeout? Most answers for old questions regarding this did not help. ((i.e. 1) turn off vpn 2) turn off virus protection. 3) rm -rf vendor 4) rm -rf composer.lock 5) composer diagnose ))

System: Mac 15.3.2 PHP: 8.4.5 Composer: 2.8.6 (homebrew version) Shell: bash

/Users/dan/temp  >>composer -vvvv create-project test
Running 2.8.6 (2025-02-25 13:03:50) with PHP 8.4.5 on Darwin / 24.3.0
Loading config file /Users/dan/poser/config.json
Failed to initialize global composer: Composer could not find the config file: /Users/dan/poser/composer.json
To initialize a project, please create a composer.json file. See 
Creating a "test" project at "./test"
Loading config file /Users/dan/poser/config.json
Checked CA file /opt/homebrew/etc/ca-certificates/cert.pem: valid
Executing command (/Users/dan/temp): 'git' 'branch' '-a' '--no-color' '--no-abbrev' '-v'
Executing command (/Users/dan/temp): 'git' 'describe' '--exact-match' '--tags'
Executing command (CWD): 'git' '--version'
Executing command (/Users/dan/temp): 'git' 'log' '--pretty=%H' '-n1' 'HEAD' '--no-show-signature'
Executing command (/Users/dan/temp): 'hg' 'branch'
Executing command (/Users/dan/temp): 'fossil' 'branch' 'list'
Executing command (/Users/dan/temp): 'fossil' 'tag' 'list'
Executing command (/Users/dan/temp): 'svn' 'info' '--xml'
Failed to initialize global composer: Composer could not find the config file: /Users/dan/poser/composer.json

Downloading .json

In CurlDownloader.php line 390:

  [Composer\Downloader\TransportException (100)]
  curl error 28 while downloading .json: Connection timed out after 10002 milliseconds


Exception trace:
  at phar:///opt/homebrew/Cellar/composer/2.8.6/bin/composer/src/Composer/Util/Http/CurlDownloader.php:390
 Composer\Util\Http\CurlDownloader->tick() at phar:///opt/homebrew/Cellar/composer/2.8.6/bin/composer/src/Composer/Util/HttpDownloader.php:392
 Composer\Util\HttpDownloader->countActiveJobs() at phar:///opt/homebrew/Cellar/composer/2.8.6/bin/composer/src/Composer/Util/HttpDownloader.php:363
 Composer\Util\HttpDownloader->wait() at phar:///opt/homebrew/Cellar/composer/2.8.6/bin/composer/src/Composer/Util/HttpDownloader.php:114
 Composer\Util\HttpDownloader->get() at phar:///opt/homebrew/Cellar/composer/2.8.6/bin/composer/src/Composer/Repository/ComposerRepository.php:1485
 Composer\Repository\ComposerRepository->fetchFile() at phar:///opt/homebrew/Cellar/composer/2.8.6/bin/composer/src/Composer/Repository/ComposerRepository.php:1194
 Composer\Repository\ComposerRepository->loadRootServerFile() at phar:///opt/homebrew/Cellar/composer/2.8.6/bin/composer/src/Composer/Repository/ComposerRepository.php:822
 Composer\Repository\ComposerRepository->hasProviders() at phar:///opt/homebrew/Cellar/composer/2.8.6/bin/composer/src/Composer/Repository/ComposerRepository.php:483
 Composer\Repository\ComposerRepository->loadPackages() at phar:///opt/homebrew/Cellar/composer/2.8.6/bin/composer/src/Composer/Repository/RepositorySet.php:199
 Composer\Repository\RepositorySet->findPackages() at phar:///opt/homebrew/Cellar/composer/2.8.6/bin/composer/src/Composer/Package/Version/VersionSelector.php:87
 Composer\Package\Version\VersionSelector->findBestCandidate() at phar:///opt/homebrew/Cellar/composer/2.8.6/bin/composer/src/Composer/Command/CreateProjectCommand.php:422
 Composer\Command\CreateProjectCommand->installRootPackage() at phar:///opt/homebrew/Cellar/composer/2.8.6/bin/composer/src/Composer/Command/CreateProjectCommand.php:196
 Composer\Command\CreateProjectCommand->installProject() at phar:///opt/homebrew/Cellar/composer/2.8.6/bin/composer/src/Composer/Command/CreateProjectCommand.php:153
 Composer\Command\CreateProjectCommand->execute() at phar:///opt/homebrew/Cellar/composer/2.8.6/bin/composer/vendor/symfony/console/Command/Command.php:298
 Symfony\Component\Console\Command\Command->run() at phar:///opt/homebrew/Cellar/composer/2.8.6/bin/composer/vendor/symfony/console/Application.php:1040
 Symfony\Component\Console\Application->doRunCommand() at phar:///opt/homebrew/Cellar/composer/2.8.6/bin/composer/vendor/symfony/console/Application.php:301
 Symfony\Component\Console\Application->doRun() at phar:///opt/homebrew/Cellar/composer/2.8.6/bin/composer/src/Composer/Console/Application.php:397
 Composer\Console\Application->doRun() at phar:///opt/homebrew/Cellar/composer/2.8.6/bin/composer/vendor/symfony/console/Application.php:171
 Symfony\Component\Console\Application->run() at phar:///opt/homebrew/Cellar/composer/2.8.6/bin/composer/src/Composer/Console/Application.php:137
 Composer\Console\Application->run() at phar:///opt/homebrew/Cellar/composer/2.8.6/bin/composer/bin/composer:98
 require() at /opt/homebrew/Cellar/composer/2.8.6/bin/composer:29

create-project [-s|--stability STABILITY] [--prefer-source] [--prefer-dist] [--prefer-install PREFER-INSTALL] [--repository REPOSITORY] [--repository-url REPOSITORY-URL] [--add-repository] [--dev] [--no-dev] [--no-custom-installers] [--no-scripts] [--no-progress] [--no-secure-http] [--keep-vcs] [--remove-vcs] [--no-install] [--no-audit] [--audit-format AUDIT-FORMAT] [--ignore-platform-req IGNORE-PLATFORM-REQ] [--ignore-platform-reqs] [--ask] [--] [<package> [<directory> [<version>]]]
发布评论

评论列表(0)

  1. 暂无评论