mingw-w64 installer "the file has been downloaded incorrectly"

I got same error and solved it, after struggling a few hours. You should download MinGW64 via https://winlibs.com/#download-release. enter image description here

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;

  1. open settings.
  2. Search for Edit environment variables for your account.
  3. choose path variable and then select edit.
  4. Select New and add the Mingw-w64 folder path(bin folder). In my case, I added (C:\mingw64\bin).
  5. Select OK to save the updated path. And reopen your cmd, then check if everything is good by typing; gcc --version

Old post but same problem, the installer doesn't seem to work.

I give the solution which works for me

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 downloaded, you have just to extract and copy/paste the MinGW64 folder( with the pre-compiled librairies) to your chosen folder ( in my case : C:\mingw64)