简体   繁体   English

无法在Windows上安装symfony

[英]Not able to install symfony on windows

Hello I am trying to install symfony on Windows. 您好,我正在尝试在Windows上安装symfony。 I had follow the all require steps for it but it end up with below message. 我已经按照所有要求的步骤进行操作,但最终出现以下消息。

[RuntimeException] Symfony can't be installed because the downloaded package is corrupted. [RuntimeException]无法安装Symfony,因为下载的软件包已损坏。 To solve this issue, try executing this command again: 要解决此问题,请尝试再次执行此命令:

Symfony new demo 3.2.8 Symfony新演示3.2.8

When i tried above command it says : 当我尝试上述命令时,它说:

'symfony' is not recognized as an internal or external command, operable program or batch file. 'symfony'不被识别为内部或外部命令,可操作程序或批处理文件。

I have try to reinstall composer and Symfony package both but it does not resolve the issue. 我尝试重新安装composer和Symfony软件包,但无法解决问题。 It stays the same issue again. 它再次保持相同的问题。

Please help me how can I install it on Windows. 请帮助我如何在Windows上安装它。

You are required to make it run through PHP as its a script file. 您需要使其通过PHP作为脚本文件运行。

This gets the installer (which it looks like you have already) 这将获得安装程序(看起来好像您已经拥有了)

php -r "readfile('https://symfony.com/installer');" > symfony

Then php symfony new demo 3.2.8 (asuming if php is in path otherwise you have to specify the php.exe path too) 然后是php symfony new demo 3.2.8 (假设php在路径中,否则您也必须指定php.exe路径)

For the full details see http://symfony.com/doc/current/setup.html 有关完整的详细信息,请参见http://symfony.com/doc/current/setup.html

Regards 问候

forget about that installer use composer from command line 忘了该安装程序从命令行使用composer

composer create-project symfony/framework-standard-edition my_project_name

BTW i don't know what server you are using (wamp/xamp etc), i recomending this https://laragon.org/ it have composer and all tools that you need to start with symfony 顺便说一句,我不知道您使用的是哪个服务器(wamp / xamp等),我建议将此https://laragon.org/推荐给您,它具有composer以及您需要以symfony开头的所有工具

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

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