linux编译安装aria2及编译时出现checking whether the C compiler works... no错误提示的解决
编译安装aria2-1.36.0
安装支持库
1 | # sudo apt install gcc autoconf automake libcppunit-dev libgnutls-dev nettle-dev libgmp-dev libssh2-1-dev libc-ares-dev libxml2-dev zlib1g-dev libsqlite3-dev pkg-config |
下载并编译安装aria2-1.36.0
依次运行一下命令:1
2
3
4
5
6
7
8
9
10
11
12
13wget https://github.com/aria2/aria2/releases/download/release-1.36.0/aria2-1.36.0.tar.bz2
tar -xjvf aria2-1.36.0.tar.bz2
cd aria2-1.36.0
./configure \
--prefix=/usr/local/aria2-1.36.0 \
--enable-libaria2 \
--enable-FEATURE \
--enable-threads=posix \
--enable-static \
--with-gnu-ld \
--with-tcmalloc
make && sudo make install
sudo ln -s /usr/local/aria2-1.36.0/bin/aria2c /usr/local/bin/aria2c
编译时出现错误
编译安装aria2-1.36.0
是出现错误提示如下:1
2
3
4
5checking for gcc... gcc
checking whether the C compiler works... no
configure: error: in `~/下载/软件/deb包/ApplicationSoftware/aria2-1.36.0':
configure: error: C compiler cannot create executables
See `config.log' for more details
解决办法:1
sudo apt install gobjc++
安装后启动出现错误
1 | aria2c -v |
支持库文件安装路径是/usr/local/lib
,而/usr/local/lib
不在系统默认的LD_LIBRARY_PATH
里,所以就找不到该lib
。
解决办法:1
sudo vim /etc/ld.so.conf
添加如下内容:
1 | /usr/local/lib |
使配置生效:1
sudo ldconfig -v
重新启动aria2
即可。
关于其他配置请参考
Aria2在Debian11下的配置
最后安装后启用的功能如图: