当前位置:Gxlcms > PHP教程 > composer全局安装lavarel时的问题

composer全局安装lavarel时的问题

时间:2021-07-01 10:21:17 帮助过:12人阅读

系统是centos6.5

  1. [root@memda www]# composer global require "laravel/installer=~1.1"
  2. Changed current directory to /root/.composer
  3. ./composer.json has been created
  4. Loading composer repositories with package information
  5. Updating dependencies (including require-dev)
  6. - Installing symfony/process (v3.1.3)
  7. Downloading: Failed
  8. Downloading: Failed
  9. Downloading: Failed
  10. Failed to download symfony/process from dist: The "https://api.github.com/repos/symfony/process/zipball/04c2dfaae4ec56a5c677b0c69fac34637d815758" file could not be downloaded: failed to open stream: No route to host
  11. Now trying to download from source
  12. - Installing symfony/process (v3.1.3)
  13. Cloning 04c2dfaae4ec56a5c677b0c69fac34637d815758
  14. Installation failed, deleting ./composer.json.
  15. The disk hosting /root/.composer is full, this may be the cause of the following exception
  16. [RuntimeException]
  17. Failed to clone https://github.com/symfony/process.git via https, ssh protocols, aborting.
  18. - https://github.com/symfony/process.git
  19. error: Failed connect to github.com:443; Operation now in progress while accessing https://github.com/symfony/process.git/info/refs
  20. fatal: HTTP request failed
  21. - git@github.com:symfony/process.git
  22. ssh: connect to host github.com port 22: No route to host
  23. fatal: The remote end hung up unexpectedly
  24. require [--dev] [--prefer-source] [--prefer-dist] [--no-plugins] [--no-progress] [--no-update] [--update-no-dev] [--update-with-dependencies] [--ignore-platform-reqs] [--sort-packages] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--] []...

总是会出现symfony/process下载失败的过程,而且完全查不到原因呀,哭哭哭哭……

回复内容:

系统是centos6.5

  1. [root@memda www]# composer global require "laravel/installer=~1.1"
  2. Changed current directory to /root/.composer
  3. ./composer.json has been created
  4. Loading composer repositories with package information
  5. Updating dependencies (including require-dev)
  6. - Installing symfony/process (v3.1.3)
  7. Downloading: Failed
  8. Downloading: Failed
  9. Downloading: Failed
  10. Failed to download symfony/process from dist: The "https://api.github.com/repos/symfony/process/zipball/04c2dfaae4ec56a5c677b0c69fac34637d815758" file could not be downloaded: failed to open stream: No route to host
  11. Now trying to download from source
  12. - Installing symfony/process (v3.1.3)
  13. Cloning 04c2dfaae4ec56a5c677b0c69fac34637d815758
  14. Installation failed, deleting ./composer.json.
  15. The disk hosting /root/.composer is full, this may be the cause of the following exception
  16. [RuntimeException]
  17. Failed to clone https://github.com/symfony/process.git via https, ssh protocols, aborting.
  18. - https://github.com/symfony/process.git
  19. error: Failed connect to github.com:443; Operation now in progress while accessing https://github.com/symfony/process.git/info/refs
  20. fatal: HTTP request failed
  21. - git@github.com:symfony/process.git
  22. ssh: connect to host github.com port 22: No route to host
  23. fatal: The remote end hung up unexpectedly
  24. require [--dev] [--prefer-source] [--prefer-dist] [--no-plugins] [--no-progress] [--no-update] [--update-no-dev] [--update-with-dependencies] [--ignore-platform-reqs] [--sort-packages] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--] []...

总是会出现symfony/process下载失败的过程,而且完全查不到原因呀,哭哭哭哭……

自己解决,忘记修改composer的全局配置了,镜像还是要使用国内的镜像,
composer config -g repo.packagist composer https://packagist.phpcomposer...
好蠢!

人气教程排行