The following approach did work for me. I got there via the link in https://stackoverflow.com/a/39113943/4533188
- Got to https://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win64/Personal%20Builds/mingw-builds/
- Click on the newest version (e.g. 8.1.0)
- Click on x86_64-posix-sjlj
- Download the 7z-Archive
Alternative way of clicking around:
- Got to https://sourceforge.net/projects/mingw-w64/
- Click on files
- Click on x86_64-posix-sjlj of the version you want
- Download the 7z-Archive
Then:
- Unzip the archive
- Inside it there is the folder
mingw64- move it (and its contents) intoC:\MinGW64 - The gcc can be found at
C:\MinGW64\mingw64\bin\gcc.exe
MinGW-w64 - for 32 and 64 bit Windows / Discussion / Open Discussion: How to install MinGW-w64 from downloaded zip file (which has not installer)?
How to install MinGW-w64
How to add man and zip to "git bash" installation on Windows - Stack Overflow
installation - mingw-w64 installer "the file has been downloaded incorrectly" - Stack Overflow
The following approach did work for me. I got there via the link in https://stackoverflow.com/a/39113943/4533188
- Got to https://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win64/Personal%20Builds/mingw-builds/
- Click on the newest version (e.g. 8.1.0)
- Click on x86_64-posix-sjlj
- Download the 7z-Archive
Alternative way of clicking around:
- Got to https://sourceforge.net/projects/mingw-w64/
- Click on files
- Click on x86_64-posix-sjlj of the version you want
- Download the 7z-Archive
Then:
- Unzip the archive
- Inside it there is the folder
mingw64- move it (and its contents) intoC:\MinGW64 - The gcc can be found at
C:\MinGW64\mingw64\bin\gcc.exe
Regarding your approaches:
- Approach 1 - the win-builds site is out of date and should not be used now.
- Approach 2 - you downloaded source code, only do this if you are set up to build from source.
- Approach 3 - it sounds like you installed it correctly and it is unclear why you feel it is not installed. NOTE - this approach goes more smoothly if you choose the option "MinGW-W64-install.exe" instead of unpacking a zip file; this will also install batch files to the start menu which set up the environment for Windows Command Prompt .
- Approach 4 - again it sounds like you installed it correctly but have a faulty expectation about the install path. MSYS2 packages will go underneath the MSYS2 root directory. And it is not clear where you typed "gcc.exe" (you should just type
gccfrom the MSYS2 mingw-w64 shell, which will be accessible from start menu and desktop shortcut if you chose that during the MSYS2 install), and you probably do not want to skip step 7 (CMake relies on gmake; you could install cmake in addition to make).
For approach 4, this list of steps is slightly better than the list you linked
I tried to install MinGW-w64, downloaded it from sourceforge.net and followed instructions from so many youtube videos and all said to add bin folder to the path... I don't see any kind of folders like this, then I downloaded and tried to install the mingw-64-install.exe but while installing it always says "The file downloaded incorrectly" then I tried it with other downloaded intall.exe files but still the sam... Now i ran out of ideas what to do! PleasE HALP
Here's another, slightly different, set of instructions to install zip for git bash on windows:
- Navigate to this sourceforge page
- Download
zip-3.0-bin.zip - In the zipped file, in the
binfolder, find the filezip.exe. - Extract the file
zip.exeto yourmingw64bin folder (for me:C:\Program Files\Git\mingw64\bin) - Navigate to to this sourceforge page
- Download
bzip2-1.0.5-bin.zip - In the zipped file, in the
binfolder, find the filebzip2.dll - Extract
bzip2.dllto yourmingw64\binfolder (same folder as above:C:\Program Files\Git\mingw64\bin)
7-zip can be added to gitbash as follows:
- Install 7-zip on windows.
- add 7-zip folder (
C:\Program Files\7-Zip) toPATH
Ongitbashexp:export PATH=$PATH:"C:\Program Files\7-Zip"(temporary)
On Windows, addingPATHlike image below (permanent)

- duplicate a copy of
7z.exeto bezip.exe - reopen
gitbashagain. done!
This way, it works on my laptop.
If you skip step 3. you still can call zip command as 7z instead of zip
Conclusion: Gitbash is running base on windows Path, I think you can run any command that you have added to your Windows PATH.
I got same error and solved it, after struggling a few hours. You should download MinGW64 via https://winlibs.com/#download-release.

After downloading, You should unzip mingw64 file to a folder(in my case I unzipped it to c disk; C:\mingw64)
And then you have to set up path. for that follow below steps;
- open settings.
- Search for Edit environment variables for your account.
- choose path variable and then select edit.
- Select New and add the Mingw-w64 folder path(bin folder). In my case, I added (C:\mingw64\bin).
- Select OK to save the updated path. And reopen your cmd, then check if everything is good by typing; gcc --version
You can directly download the archive of MinGW64 with your chosen configuration:
https://sourceforge.net/projects/mingw-w64/files/mingw-w64/
Once the compressed file is downloaded, you have just to extract and copy/paste the MinGW64 folder (with the pre-compiled libraries) to your chosen folder (in my case: C:\mingw64).