Aria2 源码下载地址
http://sourceforge.net/projects/aria2/files/stable/
个人认为 1.16.5 和 1.17.1 比 1.18 1.19 稳定很多,暂时不建议高版本编译
其实另一说是要看你系统 如果是老机器装的旧系统就老老实实用低版本,不过要是低于1.16+ 就不如用软件源自己带的版本 没必要自己费尽编译了
tar zxvf aria2-1.17.tar.gz
cd aria2-1.17.1
sudo ./configure ARIA2_STATIC=yes --enable-bittorrent --enable-metalink
部分机器貌似可以编译 但是不能make 那就考虑删掉 ARIA2_STATIC=yes
sudo ./configure --enable-bittorrent --enable-metalink
需要的lib
sudo apt-get install gcc c++ autoconf automake libcppunit-dev autopoint openssl libtool sphinx-common sphinxsearch libgcrypt11-dev libxml2-dev pkg-config
--enable-bittorrent --enable-metalink
添加BT和磁力链的支持
ubuntu 10.04.4 512M内存 AMD LX800低功耗主机 主频500MHz上面的编译结果
configure: summary of build options:
version: 0.1.1 shared 0:0:0
Host type: i586-pc-linux-gnu
Install prefix: /usr/local
C compiler: gcc
CFlags: -g -O2
Library types: Shared=yes, Static=yes
CUnit: no
Build: i586-pc-linux-gnu
Host: i586-pc-linux-gnu
Target: i586-pc-linux-gnu
Install prefix: /usr/local
CC: gcc
CXX: g++
CPP: gcc -E
CXXFLAGS: -g -O2
CFLAGS: -g -O2
CPPFLAGS: -I$(top_builddir)/deps/wslay/lib/includes -I$(top_srcdir)/deps/wslay/lib/includes -I/usr/include/libxml2
LDFLAGS: -all-static -static-libgcc -static-libstdc++
LIBS: -lrt -lgcrypt -lxml2 -lz -lpthread -ldl -lrt
DEFS: -DHAVE_CONFIG_H
LibUV: no
SQLite3: no
SSL Support:
AppleTLS:
GnuTLS: no
OpenSSL: no
CA Bundle:
LibXML2: yes
LibExpat:
LibCares: no
Zlib: yes
Epoll: yes
Bittorrent: yes
Metalink: yes
XML-RPC: yes
Message Digest: yes
WebSocket: yes
Libaria2: no
bash_completion dir: ${datarootdir}/doc/${PACKAGE_TARNAME}/bash_completion
Static build: yes
树莓派2 Arm 4核 1G内存 主频 900MHz
Ubuntu mate 15.04 vivid
configure: summary of build options:
version: 0.1.1 shared 0:0:0
Host type: armv7l-unknown-linux-gnueabihf
Install prefix: /usr/local
C compiler: gcc
CFlags: -g -O2
Library types: Shared=yes, Static=yes
CUnit: no
Build: armv7l-unknown-linux-gnueabihf
Host: armv7l-unknown-linux-gnueabihf
Target: armv7l-unknown-linux-gnueabihf
Install prefix: /usr/local
CC: gcc
CXX: g++
CPP: gcc -E
CXXFLAGS: -g -O2
CFLAGS: -g -O2
CPPFLAGS: -I$(top_builddir)/deps/wslay/lib/includes -I$(top_srcdir)/deps/wslay/lib/includes -I/usr/include/libxml2
LDFLAGS:
LIBS: -lgcrypt -lxml2
DEFS: -DHAVE_CONFIG_H
LibUV: no
SQLite3: no
SSL Support:
AppleTLS:
GnuTLS: no
OpenSSL: no
CA Bundle:
LibXML2: yes
LibExpat:
LibCares: no
Zlib: no
Epoll: yes
Bittorrent: yes
Metalink: yes
XML-RPC: yes
Message Digest: yes
WebSocket: yes
Libaria2: no
bash_completion dir: ${datarootdir}/doc/${PACKAGE_TARNAME}/bash_completion
Static build:
同时放上树莓派2 Ubuntu mate 15.04 vivid 的软件源
deb http://mirrors.ustc.edu.cn/ubuntu-ports/ vivid main restricted universe multiverse
deb http://mirrors.ustc.edu.cn/ubuntu-ports/ vivid-updates main restricted universe multiverse
deb http://mirrors.ustc.edu.cn/ubuntu-ports/ vivid-security main restricted universe multiverse
deb http://mirrors.ustc.edu.cn/ubuntu-ports/ vivid-backports main restricted universe multiverse
这个比自带的软件源快很多 400k 和 50k 下载速度的差距
Bittorrent: yes
Metalink: yes
Static build: yes
默认这些都是no,也就是不支持的意思
coufigure之后就是make和安装了,建议先卸了自带的
sudo apt-get remove aria2
然后在使用自己的编译版本
sudo make
sudo make install
非常无语的是本来就3M多的源码编译了以后要几百M
树莓派2 还好 4核编译速度依旧还是很慢,没感觉能比低主频的X86cpu快
这就是为嘛编译的之后的aria2没有BT下载功能的原因,貌似这玩意不加参数不编译成可用