- Open Windows PowerShell with the admin permission and run
Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))
In Windows PowerShell run:
choco install make
Now you can open the cmd or any terminal to run make command.
Note: If you run by the terminal of Visual Studio Code that is opening, you need to restart it (close VS Code and reopen) to recognize the make command
If you run the install command choco and appear the warning:
WARNING: An existing Chocolatey installation was detected. Installation will not continue. This script will not
overwrite existing installations.
If there is no Chocolatey installation at 'C:\ProgramData\chocolatey', delete the folder and attempt the installation
again.
Please use choco upgrade chocolatey to handle upgrades of Chocolatey itself.
If the existing installation is not functional or a prior installation did not complete, follow these steps:
- Backup the files at the path listed above so you can restore your previous installation if needed.
- Remove the existing installation manually.
- Rerun this installation script. - Reinstall any packages previously installed, if needed (refer to the lib folder in the backup). Once installation is completed, the backup folder is no longer needed and can be deleted.
To fix this warning, you can run this command to remove the existing choco installation:
Remove-Item C:\ProgramData\chocolatey -Recurse -Force
Run the choco installation command again