Customisation of the MacPorts download method

Artur Szostak aszostak at
Mon Oct 27 09:32:17 PDT 2014


I am running OS X 10.9 in VirtualBox on a MacMini, itself running 10.9. The purpose is to have a build/test image that can be thrown away and recreated. MacPorts 2.3.1 is installed on the virtual machine guest from the provided package:

When trying to install wcslib with the following command:
  sudo port install wcslib
The command hangs at the point where it is trying to download the file wcslib-4.23.tar.bz2 from At some point it eventually times out and the command fails.

When trying to download the file ( manually with the curl command, I reproduce the hang. However, when trying to download the same file with wget it downloads successfully.

Looking through the verbose trace of curl's connection produces no clues as to what may be wrong:

$ curl -v
* Adding handle: conn: 0x7fa751805e00
* Adding handle: send: 0
* Adding handle: recv: 0
* Curl_addHandleToPipeline: length: 1
* - Conn 0 (0x7fa751805e00) send_pipe: 1, recv_pipe: 0
* About to connect() to port 21 (#0)
*   Trying
* Connected to ( port 21 (#0)
< 220-This is the anonymous FTP server operated by
< 220-  CSIRO Astronomy and Space Science and
< 220-  CSIRO ICT Centre.
< 220-
< 220-All transfers from this machine are logged.
< 220 If you don't agree with this policy then please disconnect now.
> USER anonymous
< 230 Anonymous user logged in
< 257 "/" is your current location
* Entry path is '/'
> CWD pub
< 250 OK. Current directory is /pub
> CWD software
< 250 OK. Current directory is /pub/software
> CWD wcslib
< 250 OK. Current directory is /pub/software/wcslib
* Connect data stream passively
< 229 Extended Passive mode OK (|||60326|)
*   Trying
* Connecting to ( port 60326
(hangs, no more output)

So, its clear its a networking problem, but its not clear at what level. It could be either on the server side, in the VirtualBox networking, or in curl itself.
I would love to solve the route cause of the problem, but I do not see how this is going to be fixed anytime soon. Thus, for the time being I need a workaround if possible: Can one tell MacPorts to use a different download tool?

Kind regards.


From: Jeremy Lavergne [jeremy at]
Sent: 27 October 2014 16:40
To: Artur Szostak
Cc: macports-users at
Subject: Re: Customisation of the MacPorts download method

Can you elaborate on the issues?

Rather than avoiding the problem it’d be best to fix it.

On Oct 27, 2014, at 11:38, Artur Szostak <aszostak at> wrote:

> Am I correct in assuming that MacPorts uses curl or the curl library to perform source code downloads?
> And is there any way to customise this? for example, get MacPorts to use wget instread?
> The reason is that I am experiencing problems with curl, while wget works.
> Kind regards.

More information about the macports-users mailing list