Sunday, January 3, 2010

Compile Aria2c on Debian Linux

Aria2 is a fast download utility that you use in the Command Prompt or xterm. To compile aria2 for Linux, install the following packages.



  • ca-certificates
  • g++
  • make
  • libexpat1-dev
  • libsqlite3-dev
  • libssl-dev
  • zlib1g-dev


Although Debian 5.0 Lenny has libc-ares2, Debian 4.0 Etch and Debian 3.1 Sarge don't have it. As a user of Debian Sarge, I had to compile c-ares myself to enable asynchronous DNS resolution in Aria2c. I downloaded c-ares source from c-ares.haxx.se and compiled it statically.



tar xzvf c-ares-1.7.0.tar.gz

cd c-ares-1.7.0/

./configure --prefix=/usr --build=i586-pc-linux-gnu --disable-debug --disable-shared CFLAGS='-DCARES_STATICLIB'

make

make install


Then, I downloaded Aria2 source from aria2.sf.net and compiled it like this:



tar xzvf aria2-1.8.0.tar.gz

cd aria2-1.8.0

./configure --build=i586-pc-linux-gnu --prefix=/usr --enable-bittorrent --enable-metalink --enable-threads=posix --with-ca-bundle="/etc/ssl/certs/ca-certificates.crt" LIBS='-lrt -lcares' CPPFLAGS='-DCARES_STATICLIB'


You can optionally link aria2 with static libraries libssl and libcrypto. This is useful when you move aria2c to another system with a different version of OpenSSL library. To do so, open every Makefile in the aria2 source directory and change every line containing “-L/usr/local/lib -lssl -lcrypto” to “/usr/lib/libssl.a /usr/lib/libcrypto.a”. Then, run the following commands to build aria2.



make
make install


An executable /usr/bin/aria2c will be installed. To use it, open a xterm or rxvt and type its command. To see brief command-line options, type aria2c -h.

No comments:

Post a Comment

About This Blog

KBlog logo This blog seeks to provide a collection of interesting pictures found on the Web. Thanks for visiting the blog and posting your comments.

© Contents by KBlog

© Blogger template by Emporium Digital 2008

Followers

Total Pageviews

Powered By Blogger