作曲家更新失败,“...目标机器主动拒绝连接...”

时间:2016-02-03 19:41:18

标签: php composer-php

我正在尝试做一个简单的作曲家动作(安装laravel),并在大门停下来。

完整的错误消息是

C:\.....\Composer>composer install
Loading composer repositories with package information

  [Composer\Downloader\TransportException]
  The "https://packagist.org/packages.json" file could not be downloaded: failed to open stream: No connection could be made because the target machine actively refused it.

install [--prefer-source] [--prefer-dist] [--dry-run] [--dev] [--no-dev] [--no-plugins] [--no-custom-installers] [--no-autoloader] [--no-scripts] [--no-progress
] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--ignore-platform-reqs] [--] [<packages>]...

C:\.....\Composer>

Win7 / PHP5.5.8

我正在使用Chrome和IE,两者都使用相同的自动配置脚本(指向“wpad.dat”文件)。

我尝试了以下内容:

  • 诊断中的PHP变量(php -i)

    变量=&gt;值 ...

    _SERVER["https_proxy"] => http://172.26.3.10:8080

    _SERVER["http_proxy"] => http://172.26.3.10:8080

我错过了什么?我一直在关注各种各样的线程,但我似乎错过了一些非常基本的东西。

`C:\ xampp \ htdocs&gt; composer -v global require“laravel / installer”

Changed current directory to C:/Users/.../AppData/Roaming/Composer

[Composer\Downloader\TransportException]
  The "https://packagist.org/packages.json" file could not be downloaded: failed to open stream: No connection could be made because the target machine actively refused it.

Exception trace:
 () at phar://C:/xampp/htdocs/composer.phar/src/Composer/Util/RemoteFilesystem.php:297
 Composer\Util\RemoteFilesystem->get() at phar://C:/xampp/htdocs/composer.phar/src/Composer/Util/RemoteFilesystem.php:84
 Composer\Util\RemoteFilesystem->getContents() at phar://C:/xampp/htdocs/composer.phar/src/Composer/Repository/ComposerRepository.php:601
 Composer\Repository\ComposerRepository->fetchFile() at phar://C:/xampp/htdocs/composer.phar/src/Composer/Repository/ComposerRepository.php:415
 Composer\Repository\ComposerRepository->loadRootServerFile() at phar://C:/xampp/htdocs/composer.phar/src/Composer/Repository/ComposerRepository.php:246
 Composer\Repository\ComposerRepository->hasProviders() at phar://C:/xampp/htdocs/composer.phar/src/Composer/DependencyResolver/Pool.php:99
 Composer\DependencyResolver\Pool->addRepository() at phar://C:/xampp/htdocs/composer.phar/src/Composer/Command/InitCommand.php:565
 Composer\Command\InitCommand->getPool() at phar://C:/xampp/htdocs/composer.phar/src/Composer/Command/InitCommand.php:601
 Composer\Command\InitCommand->findBestVersionForPackage() at phar://C:/xampp/htdocs/composer.phar/src/Composer/Command/InitCommand.php:334
 Composer\Command\InitCommand->determineRequirements() at phar://C:/xampp/htdocs/composer.phar/src/Composer/Command/RequireCommand.php:107
 Composer\Command\RequireCommand->execute() at phar://C:/xampp/htdocs/composer.phar/vendor/symfony/console/Command/Command.php:256
 Symfony\Component\Console\Command\Command->run() at phar://C:/xampp/htdocs/composer.phar/vendor/symfony/console/Application.php:838
 Symfony\Component\Console\Application->doRunCommand() at phar://C:/xampp/htdocs/composer.phar/vendor/symfony/console/Application.php:189
 Symfony\Component\Console\Application->doRun() at phar://C:/xampp/htdocs/composer.phar/src/Composer/Console/Application.php:147
 Composer\Console\Application->doRun() at phar://C:/xampp/htdocs/composer.phar/vendor/symfony/console/Application.php:120
 Symfony\Component\Console\Application->run() at phar://C:/xampp/htdocs/composer.phar/src/Composer/Console/Application.php:82
 Composer\Console\Application->run() at phar://C:/xampp/htdocs/composer.phar/src/Composer/Command/GlobalCommand.php:80
 Composer\Command\GlobalCommand->run() at phar://C:/xampp/htdocs/composer.phar/vendor/symfony/console/Application.php:838
 Symfony\Component\Console\Application->doRunCommand() at phar://C:/xampp/htdocs/composer.phar/vendor/symfony/console/Application.php:189
 Symfony\Component\Console\Application->doRun() at phar://C:/xampp/htdocs/composer.phar/src/Composer/Console/Application.php:147
 Composer\Console\Application->doRun() at phar://C:/xampp/htdocs/composer.phar/vendor/symfony/console/Application.php:120
 Symfony\Component\Console\Application->run() at phar://C:/xampp/htdocs/composer.phar/src/Composer/Console/Application.php:82
 Composer\Console\Application->run() at phar://C:/xampp/htdocs/composer.phar/bin/composer:43
 require() at C:\xampp\htdocs\composer.phar:24`


require [--dev] [--prefer-source] [--prefer-dist] [--no-progress] [--no-update] [--update-no-dev] [--update-with-dependencies] [--ignore-platform-reqs] [--sort
packages] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--] [<packages>]...

C:\xampp\htdocs>

1 个答案:

答案 0 :(得分:0)

我首先要启用作曲家的详细输出,比如

composer -v install

可能会有所启发,但不能保证