Compile a powerful command-line download tool

Jan 17, '07 07:30:02AM

Contributed by: y10k

I have always found that Mac OS X lacks an elegant yet free downloading tool that supports segmented downloading until I met ">aria2, which is a linux-based command-line downloading tool. From their website:

aria2 is a download utility with resuming and segmented downloading. Supported protocols are HTTP/HTTPS/FTP/BitTorrent. It also supports Metalink version 3.0.
It is very stable and fast (at least no slower than Speed Download and iGetter on my computer. However, the latest 0.9 version of aria2 does not compile on Mac OS X. After some work, I figured out how to make it compile -- read on for the how-to.

Here's how I got the latest version (0.9 as of this writing) to compile on OS X:

  1. Download the latest 0.9 version of aria2.
  2. Untar by double-clicking the downloaded file.
  3. Use a plain text editor to open the file src/DefaultBtContext.cc. Just after the line #include "Util.h", add this section:
    char *
    basename (const char *filename)
    {
      char *p = strrchr (filename, '/');
      return p ? p + 1 : (char *) filename;
    }
  4. Go to Terminal, cd to the folder where aria2c source is located, and run the following commands:
    ./configure
    make
    sudo make install
That's it; you're done -- after it compiles, feel free to delete the original folder and files generated. You'll find aria2c in the /usr/local/bin folder, ready to run. Now you can run use aria2c to download any files you want.

[robg adds: This worked as described for me. After installing, you can get help by typing man aria2c in Terminal.]

Comments (9)


Mac OS X Hints
http://hints.macworld.com/article.php?story=20070114214453420