Macports and http proxy

Joshua Root jmr at
Fri Jul 17 06:38:35 PDT 2009

On 2009-7-17 22:51, Pawel Veselov wrote:
>> Hey
>> I'm not able to get a connection with MacPorts 1.5 running on
>> Leopard. It loops trying to download the files from all the mirrors
>> it knows but isn't able to make a connection. Arg, I didn't used to
>> have this problem in 10.4.
>> I've set a http_proxy env variable as well as a "proxy =" line
>> in .curlrc. Curl itself from the commandline works perfectly fine,
>> however when invoked by Macports it just doesn't make the connection.
> I know, I know, this is 2007 post, but here am I, running into the
> same wall, and there wasn't an answer in the thread that worked for
> me.
> So, what I found that this is not a bug. This is what needs to be done:
> 1. Export the environment variable (usually http_proxy, check curl's
> man), to the full address of the proxy (proto://host:port).
> 2. Check your /etc/sudoers (under sudo), and see the variable list. If
> the variable doesn't find its way to libcurl, it must be sudo that
> clears it out. In my default Leopard coniguration, sudo had
> "env_reset" instruction, and then a handful of variables that are
> allowed. "http_proxy" wasn't one of them, of course, and adding it
> there (as Defaults env_keep += "http_proxy") solved the problem.

Right. MacPorts 1.8 will be able to get your proxy settings in a couple
of other ways: <>

- Josh

More information about the macports-users mailing list