How to install symfony cli on windows 10?

22.9k Views Asked by At

I tried to install with scoop, tried with binary installation and it crashed. Everytime I run symfony command I always get Warning: readfile(http://symfony.com/installer): Failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found in Command line code on line 1. Then I tried to install it on wsl, but I get same results. Any idea how to fix it?

3

There are 3 best solutions below

0
On

I suggest you install it with power shell with the given steps

Step1 - Open Power shell and Run the command -

iwr -useb get.scoop.sh | iex

Note – If it asks for Some execution policy for powershell, run the following command and then try installing scoop.

Set-ExecutionPolicy RemoteSigned -Scope CurrentUser

Step 2 -

scoop install symfony-cli

Step 3 - Create Symfony Project -

symfony new newApp

Then

cd newApp
0
On

Don't forget to update to latest version using :

scoop update symfony-cli
1
On

I suggest you install it using the recommended method, using Scoop tool

Scoop official website

Open powershell from start menu then paste this code to install it (I got it from scoop website)

Invoke-Expression (New-Object System.Net.WebClient).DownloadString('https://get.scoop.sh')

Then in powershell execute this command

scoop install symfony-cli

this is the current recommended method to install symfony cli on windows

After that check it by calling this command

symfony -v

If it doesn't work try closing powershell and open it again ( so It refreshs its variables ) the use the last command again

If this doesn't work the problem may be in your OS configuration or networking

Good luck