编辑器更新不运行



当我运行作曲家更新时,它失败显示错误:

[ComposerDownloaderTransportException]                                                                           
The "https://packagist.org/packages.json" file could not be     downloaded: failed to open stream: 

连接被拒绝

如果我从浏览器访问 URL,它会通过,当我尝试从我的终端获取或卷曲 URL 时,它会显示错误:

--2017-02-05 20:41:58--  https://packagist.org/packages.json
Connecting to 127.0.0.1:8888... failed: 
Connection refused.
--2017-02-05 20:41:58--  https://packagist.org/packages.json
Connecting to 127.0.0.1:8888... failed: Connection refused.

我认为这是代理连接的东西,但我似乎无法解决问题。

如果我运行作曲家更新 -vv,波纹管是完整的跟踪:

Reading ./composer.json
Loading config file ./composer.json
Checked CA file /etc/ssl/certs/ca-certificates.crt: valid
Executing command (/var/www/gidiscrap): git branch --no-color --no-                     abbrev -v
Cannot create cache directory      /home/oluwaslim/.composer/cache/repo/https---packagist.org/, or directory is not writable. Proceeding without cache
Cannot create cache directory /home/oluwaslim/.composer/cache/files/, or directory is not writable. Proceeding without cache
Failed to initialize global composer: Composer could not find the config file: /home/oluwaslim/.composer/composer.json
To initialize a project, please create a composer.json file as described in the https://getcomposer.org/ "Getting Started" section
Reading /var/www/gidiscrap/vendor/composer/installed.json
Running 1.3.2 (2017-01-27 18:23:41) with PHP 7.0.13-0ubuntu0.16.04.1 on Linux / 4.4.0-59-generic
Loading composer repositories with package information
   Downloading https://packagist.org/packages.json using proxy 127.0.0.1:8888
   Downloading https://packagist.org/packages.json using proxy 127.0.0.1:8888
   Downloading https://packagist.org/packages.json using proxy 127.0.0.1:8888

  [ComposerDownloaderTransportException]                                                                           
  The "https://packagist.org/packages.json" file could not be downloaded: failed to open stream: Connection refused  

Exception trace:
 () at phar:///usr/local/bin/composer/src/Composer/Util/RemoteFilesystem.php:489
 ComposerUtilRemoteFilesystem->get() at phar:///usr/local/bin/composer/src/Composer/Util/RemoteFilesystem.php:101
 ComposerUtilRemoteFilesystem->getContents() at phar:///usr/local/bin/composer/src/Composer/Repository/ComposerRepository.php:665
 ComposerRepositoryComposerRepository->fetchFile() at phar:///usr/local/bin/composer/src/Composer/Repository/ComposerRepository.php:479
 ComposerRepositoryComposerRepository->loadRootServerFile() at phar:///usr/local/bin/composer/src/Composer/Repository/ComposerRepository.php:258
 ComposerRepositoryComposerRepository->hasProviders() at phar:///usr/local/bin/composer/src/Composer/DependencyResolver/Pool.php:99
 ComposerDependencyResolverPool->addRepository() at phar:///usr/local/bin/composer/src/Composer/Installer.php:376
 ComposerInstaller->doInstall() at phar:///usr/local/bin/composer/src/Composer/Installer.php:223
 ComposerInstaller->run() at phar:///usr/local/bin/composer/src/Composer/Command/UpdateCommand.php:158
 ComposerCommandUpdateCommand->execute() at phar:///usr/local/bin/composer/vendor/symfony/console/Command/Command.php:257
 SymfonyComponentConsoleCommandCommand->run() at phar:///usr/local/bin/composer/vendor/symfony/console/Application.php:850
 SymfonyComponentConsoleApplication->doRunCommand() at phar:///usr/local/bin/composer/vendor/symfony/console/Application.php:193
 SymfonyComponentConsoleApplication->doRun() at phar:///usr/local/bin/composer/src/Composer/Console/Application.php:227
 ComposerConsoleApplication->doRun() at phar:///usr/local/bin/composer/vendor/symfony/console/Application.php:124
 SymfonyComponentConsoleApplication->run() at phar:///usr/local/bin/composer/src/Composer/Console/Application.php:100
 ComposerConsoleApplication->run() at phar:///usr/local/bin/composer/bin/composer:54
 require() at /usr/local/bin/composer:24

帮助将不胜感激!我似乎无法克服此错误

我在 Ubuntu Linux 16.04 上,下面是我必须做的来解决这个问题,正如我之前提到的,它的代理设置存在一些问题。

步骤 1

  • 转到系统设置
  • 网络
  • 网络代理
  • 将其更改为无
  • 最后单击应用系统范围

步骤 2

  • 打开终端并键入以下命令。
    unset https_proxy && unset socks_proxy && unset ftp_proxy

最后重新启动系统。上面的解决方案为我解决了问题。

该行using proxy 127.0.0.1:8888表示您的系统有问题。我可以猜到这是一个非常激进的防病毒软件。除非必须通过代理连接,否则您没有理由在端口 8888 上连接到本地主机。你能做什么?检查防病毒设置并关闭通过 HTTPS 的安全连接检查。

最新更新