简体   繁体   English

无法安装 Laravel

[英]Unable to install laravel

I was trying to install Laravel at work and I could not do it, I know there might be a proxy problem because there some restrictions but I am not sure, this is the error message I get when I run the install on terminal我试图在工作中安装 Laravel 但我无法做到,我知道可能存在代理问题,因为有一些限制,但我不确定,这是我在终端上运行安装时收到的错误消息

I run this command我运行这个命令

composer create-project --prefer-dist laravel/laravel testproject

and I got this error message我收到了这个错误信息

The "https://packagist.org/packages.json" file could not be downloaded: failed to open stream: Operation timed out
Retrying with degraded mode, check https://getcomposer.org/doc/articles/troubleshooting.md#degraded-mode for more info


  [Composer\Downloader\TransportException]                                                                         
  The "https://packagist.org/packages.json" file could not be downloaded: failed to open stream: No route to host 

any ideas?有任何想法吗?

thanks谢谢

I found the slution!我找到了解决方案! is by adding the proxy at the beginning of the command like this是通过在这样的命令开头添加代理

HTTP_PROXY="http;//yourproxy.something" composer create-project
--prefer-dist laravel/laravel testproject

est voila, it works :D est voila,它有效:D

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM