好友
阅读权限10
听众
最后登录1970-1-1
|
本帖最后由 mirai2021 于 2023-7-7 16:27 编辑
首先声明: 不清楚板块是否正确, 因为是android相关上次发到androd分享板块, 如果这次还是不对请不要处罚, 以后不会再发此类相关方法了
升级libxml2极其依赖组件之后之前编译的aria2c无法正确运行了, 返回以下错误:
CANNOT LINK EXECUTABLE "aria2c": cannot find "libxml2.so" from verneed[5] in DT_NEEDED list for "/data/data/com.termux/files/usr/bin/aria2c"
使用源码编译返回错误无法成功编译为可执行文件,以下是编译方法,加粗字体是我的解决方案:
pkg install build-essential
wget https://github.com/aria2/aria2/releases/download/release-1.36.0/aria2-1.36.0.tar.gz
tar -zxvf aria2-1.36.0.tar.gz
cd aria2-1.36.0
sed -i 's/"1", 1, 16/"128", 1, -1/g' ./src/OptionHandlerFactory.cc
sed -i 's/"20M", 1_m, 1_g/"4K", 1_k, 1_g/g' ./src/OptionHandlerFactory.cc
sed -i 's/PREF_CONNECT_TIMEOUT, TEXT_CONNECT_TIMEOUT, "60", 1, 600/PREF_CONNECT_TIMEOUT, TEXT_CONNECT_TIMEOUT, "30", 1, 600/g' ./src/OptionHandlerFactory.cc
sed -i 's/PREF_PIECE_LENGTH, TEXT_PIECE_LENGTH, "1M", 1_m, 1_g/PREF_PIECE_LENGTH, TEXT_PIECE_LENGTH, "4k", 1_k, 1_g/g' ./src/OptionHandlerFactory.cc
sed -i 's/new NumberOptionHandler(PREF_RETRY_WAIT, TEXT_RETRY_WAIT, "0", 0, 600/new NumberOptionHandler(PREF_RETRY_WAIT, TEXT_RETRY_WAIT, "2", 0, 600/g' ./src/OptionHandlerFactory.cc
sed -i 's/new NumberOptionHandler(PREF_SPLIT, TEXT_SPLIT, "5", 1, -1,/new NumberOptionHandler(PREF_SPLIT, TEXT_SPLIT, "8", 1, -1,/g' ./src/OptionHandlerFactory.cc
export LD_LIBRARY_PATH=$PREFIX/lib
autoreconf -i
./configure
make
|
|