20
votes

I am trying to install mingw-w64 onto Windows. However I receive an error, "the file has been downloaded incorrectly". Redownloading the setup file again from sourceforge does not fix the problem. Is there an alternative way to install it or am I doing something wrong?

4
I suggest trying the manual method outlined here: mingw.org/wiki/HOWTO_Install_the_MinGW_GCC_Compiler_Suite I had the same issue and that's what I did. You can also try this setup tool cfhcable.dl.sourceforge.net/project/mingw/Installer/… I had issues with both tools hence the manual way which is very painful. Goodluck. - user264431
I had the same problem but chaning version to the second newest (from 7.3.0 to 7.2.0) solved it - Xeverous
I couldn't execute from download folder in win10, copied the exe file to c/temp and executed from there fine - Sergio Solorzano

4 Answers

22
votes

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)

4
votes

Finally, I solved this problem by downloading this:http://winlibs.com/

GCC 10.1.0 + LLVM/Clang/LLD/LLDB 10.0.0 + MinGW-w64 7.0.0 - release 3 (LATEST) Win32: 7-Zip archive* | Zip archive Win64: 7-Zip archive* | Zip archive

and set the %path%

After that, I still can't execute gcc correctly, but then I solved the problem by adding this environment variable:

"CGO_ENABLED=1"

I encountered the problem when using this golang package: https://github.com/mattn/go-sqlite3

2
votes

I received the same error. When I re-ran the installer as an adminstrator it was installed successfully.

I also made sure not to add any spaces to the installation path.

1
votes

The problem is with your internet connection and/or ISP. I'm not great at networking so I'll let others be more specific. I tried installing/downloading it using my mobile's data as wifi hotspot and it worked. Hope it helps