linux 多线程 下载 aria2


linux 多线程 下载 aria2


<code>aria2c -x 16 [url]/<code>

1 编译安装

升级 gcc

Aria2 1.17.1以上版本要求gcc >= 4.8.3 or clang >= 3.4
以下选择编译升级gcc(需要3个小时左右)
可以选择其他方式升级gcc https://www.vpser.net/manage/centos-6-upgrade-gcc.html

<code>wget http://ftp.tsukuba.wide.ad.jp/software/gcc/releases/gcc-5.2.0/gcc-5.2.0.tar.bz2tar -xf gcc-5.2.0.tar.bz2cd gcc-5.2.0./contrib/download_prerequisitesmkdir gcc-tempcd gcc-temp../configure --enable-checking=release --enable-languages=c,c++ --disable-multilibmake -j4make installls /usr/local/bin | grep gcc/usr/sbin/update-alternatives --install  /usr/bin/gcc gcc /usr/local/bin/x86_64-unknown-linux-gnu-gcc-5.2.0 52gcc -vfind / -name "libstdc++.so*"cp /root/gcc-5.2.0/gcc-temp/stage1-x86_64-unknown-linux-gnu/libstdc++-v3/src/.libs/libstdc++.so.6.0.21 /usr/lib64cd /usr/lib64rm -rf libstdc++.so.6ln -s libstdc++.so.6.0.21 libstdc++.so.6strings /usr/lib64/libstdc++.so.6 | grep GLIBC/<code>

安装clang

<code>wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-6.repoyum -y install clang/<code>

安装Aria2

最新地址下载 https://github.com/aria2/aria2/releases

<code>wget https://github.com/aria2/aria2/releases/download/release-1.35.0/aria2-1.35.0.tar.bz2tar xf aria2-1.35.0.tar.bz2cd aria2-1.35.0./configuremake -j4make install/<code>

yum 安装(版本过低)

yum 安装 rpmforge-release 源
yum -y install http://ftp.tu-chemnitz.de/pub/linux/dag/redhat/el6/en/x86_64/rpmforge/RPMS/rpmforge-release-0.5.3-1.el6.rf.x86_64.rpm
yum -y install aria2

如下报错

<code>06/05 13:49:16 [ERROR] CUID#6 - Download aborted. URI=https://cdn.mysql.com//Downloads/MySQL-8.0/mysql-community-server-8.0.16-2.el6.x86_64.rpmException: [AbstractCommand.cc:304] errorCode=1 URI=https://cdn.mysql.com//Downloads/MySQL-8.0/mysql-community-server-8.0.16-2.el6.x86_64.rpm  -> [SocketCore.cc:1128] errorCode=1 Certificate verification failed. Cause:  `not signed by known authorities or invalid' `issuer is not known' See --ca-certificate and --check-certificate option.06/05 13:49:16 [NOTICE] Download GID#b9691ccc08bcb68f not complete: Download Results:gid   |stat|avg speed  |path/URI======+====+===========+=======================================================b9691c|ERR |       0B/s|https://cdn.mysql.com//Downloads/MySQL-8.0/mysql-community-server-8.0.16-2.el6.x86_64.rpmStatus Legend:(ERR):error occurred.aria2 will resume download if the transfer is restarted.If there are any errors, then see the log file. See '-l' option in help/man page for details./<code>

解决方案

<code> aria2c -x 10 --check-certificate=false [url]/<code>


分享到:


相關文章: