18

Situation
I want to install minGW and msys on a work pc, but I'm behind a proxy. The proxy settings are configured to auto detect in both internet explorer and firefox. The proxy is a http proxy on port 80 that requires authentification.
I also have the url of the proxy and a .pac configuration script.
The system is windows 7 64 bit.

Problem
MinGW setup does not recognize the proxy settings and therefore cannot download any packages for installation.

What I've tried so far
I've tried changing the proxy settings in the internet explorer's internet options from auto detect to manual setup. I've also tried running the installer through proxifier. Both didn't work.

4 Answers 4

23

New MSYS2 finally has proxy capabilites

The new MSYS2 now uses pacman, the package manager from the arch linux project, to manage both msys and mingw packages. Pacman is capable of using authenticated http(s) proxies, see this article in the Arch Linux wiki for more information.
I added the following lines to \msys64\etc\profile:

# proxy settings
export HTTP_PROXY="username:[email protected]:port"
export HTTPS_PROXY=$HTTP_PROXY
export http_proxy=$HTTP_PROXY
export https_proxy=$HTTP_PROXY

and I can now finally install and update minGW and msys packages using pacman through the authenticated http(s) proxy here.

3
  • 2
    The command line to install mingw64-w64 using pacman can be found at stackoverflow.com/questions/30069830/…
    – francis
    Aug 19, 2016 at 11:24
  • 1
    Those don't work for me (I still get 407 HTTP errors). Is there an alternative syntax? Nov 7, 2018 at 13:12
  • Looks like MSYS2 installer does not work under proxy.
    – random
    Mar 5, 2021 at 16:58
3

If you are behind a corporate proxy which uses your windows login to authenticate you using NTLM or Windows Kerberos, it's best not to write down your password in clear-text config files. Instead, you could install PX, run it, and then install your packages with:

export https_proxy="127.0.0.1:3128"
pacman -S mingw-w64-x86_64-toolchain
0

I'm sorry but that installer on surceforge is not proxy compatible right now (12/02/2014).

EDIT:

As a good workaround you can install codeblocks for windows: it comes with a bundled working MinGW pack with it or you can use this

http://sourceforge.net/projects/mingwbundle/

3
  • is it proxy compatible yet? Mar 15, 2016 at 8:10
  • not tried yet !
    – velteyn
    Mar 17, 2016 at 8:32
  • @KillerSnail, see my new answer, it finally happened!
    – youR.Fate
    Jul 5, 2016 at 13:19
0

One option that worked for me is to use TDM-GCC

  • Download the bundle installer that is correct for your system
  • Manually download all the individual packages and save them to

    C:\TDM-GCC-64\__installer\downloaded
    
  • Run the TDM-GCC bundle installer and it should work
1
  • That is only a compiler suite though, I use mingw/msys as a way to have common *nix tools in my windows command line.
    – youR.Fate
    Jun 26, 2018 at 12:41

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .