Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Compile a powerful command-line download tool UNIX
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.]
    •    
  • Currently 2.00 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (1 vote cast)
 
[12,549 views]  

Compile a powerful command-line download tool | 9 comments | Create New Account
Click here to return to the 'Compile a powerful command-line download tool' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Compile a powerful command-line download tool
Authored by: fds on Jan 17, '07 07:56:28AM

Wouldn't
#include <libgen.h>
be sufficient?

That's where basename is defined according to
man 3 basename



[ Reply to This | # ]
Compile a powerful command-line download tool
Authored by: mcowger on Jan 17, '07 09:52:53AM

Indeed - I just tried including libgen.h and it compiles fine



[ Reply to This | # ]
Alternative to obtain aria2
Authored by: pepi on Jan 17, '07 12:29:03PM
You can get (a little bit older version) via DarwinPorts/MacPorts as well.

[ Reply to This | # ]
Compile a powerful command-line download tool
Authored by: davconvent on Apr 18, '07 05:31:26AM

This is now included in aria2-0.10.2



[ Reply to This | # ]
Compile a powerful command-line download tool
Authored by: kencunningham on Jan 17, '07 01:20:53PM
I've used 'axel' for the past few years for this: http://wilmer.gaast.net/main.php/axel.html.

It's a command-line program, but there is also a free GUI for it available, called "Axelerate": http://www.lintux.cx/axel.html .

[ Reply to This | # ]
Compile a powerful command-line download tool
Authored by: kencunningham on Jan 17, '07 01:23:26PM
Oh, sorry, that link to Axelerate wasn't right. Here it is: http://www.versiontracker.com/dyn/moreinfo/macosx/20388

[ Reply to This | # ]
Compile a powerful command-line download tool
Authored by: blgrace on Jan 17, '07 04:06:40PM

Ok so I stole this code that was originally used with 'curl' - but essentially allows you to download files to your Desktop using a link copied to the paste buffer.

It's in the form of a bash alias - and I'm sure someone can do better
Anyway - it works as is

alias aria='cd ~/Desktop && aria2c $(pbpaste) && cd - '



[ Reply to This | # ]
Compile a powerful command-line download tool
Authored by: eliashc on Feb 17, '07 06:57:53AM

aria2 0.10.1 is available via macports.



[ Reply to This | # ]
Compile a powerful command-line download tool
Authored by: hypert on Apr 02, '07 05:19:44PM

As of release 0.10.2+, it should compile on Mac OS X without any modifications.



[ Reply to This | # ]