admin

error: gettext infrastructure mismatch: using a Makefile.in.in from gettext version 0.18 but the autoconf macros are from gettext version 0.19
前言今天在修改aria2最大线程数后编译的时候报了这个错误:[email protected]:/opt/aria2-master...
扫描右侧二维码阅读全文
15
2018/12

error: gettext infrastructure mismatch: using a Makefile.in.in from gettext version 0.18 but the autoconf macros are from gettext version 0.19

前言

今天在修改aria2最大线程数后编译的时候报了这个错误:

[email protected]:/opt/aria2-master# make
make  all-recursive
make[1]: Entering directory '/opt/aria2-master'
Making all in po
make[2]: Entering directory '/opt/aria2-master/po'
*** error: gettext infrastructure mismatch: using a Makefile.in.in from gettext version 0.18 but the autoconf macros are from gettext version 0.19
Makefile:168: recipe for target 'check-macro-version' failed
make[2]: *** [check-macro-version] Error 1
make[2]: Leaving directory '/opt/aria2-master/po'
Makefile:556: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/opt/aria2-master'
Makefile:467: recipe for target 'all' failed
make: *** [all] Error 2

最终在 Google 大佬的帮助下找到解决办法。

过程

简单记录下aria2修改最大线程数的方法吧:
首先下载源码:

git clone https://github.com/aria2/aria2.git

然后修改aria2/src/OptionHandlerFactory.cc文件。

OptionHandler* op(new NumberOptionHandler(PREF_MAX_CONNECTION_PER_SERVER, TEXT_MAX_CONNECTION_PER_SERVER, '1', 1, 16, 'x'));

修改为

OptionHandler* op(new NumberOptionHandler(PREF_MAX_CONNECTION_PER_SERVER, TEXT_MAX_CONNECTION_PER_SERVER, '128', 1, -1, 'x'));

PREF_MIN_SPLIT_SIZE, TEXT_MIN_SPLIT_SIZE, '20M', 1_m, 1_g, 'k'));

修改为

PREF_MIN_SPLIT_SIZE, TEXT_MIN_SPLIT_SIZE, '4K', 1_k, 1_g, 'k'));

PREF_CONNECT_TIMEOUT, TEXT_CONNECT_TIMEOUT, '60', 1, 600));

修改为

PREF_CONNECT_TIMEOUT, TEXT_CONNECT_TIMEOUT, '30', 1, 600));

PREF_PIECE_LENGTH, TEXT_PIECE_LENGTH, '1M', 1_m, 1_g));

修改为

PREF_PIECE_LENGTH, TEXT_PIECE_LENGTH, '4k', 1_k, 1_g));

new NumberOptionHandler(PREF_RETRY_WAIT, TEXT_RETRY_WAIT, '0', 0, 600));

修改为

new NumberOptionHandler(PREF_RETRY_WAIT, TEXT_RETRY_WAIT, '2', 0, 600));

new NumberOptionHandler(PREF_SPLIT, TEXT_SPLIT, '5', 1, -1, 's'));

修改为

new NumberOptionHandler(PREF_SPLIT, TEXT_SPLIT, '8', 1, -1, 's'));

紧接着执行:

$ autoreconf -i

$ ./configure

$ make && make install

执行到make时报最上面的错误。
解决方法:
/opt/aria2-master/po/Makefile.in.in文件用你本地安装的gettext目录中的覆盖:

$ cp /usr/share/gettext/po/Makefile.in.in /opt/aria2-master/po/Makefile.in.in

问题得以解决。

Last modification:December 15th, 2018 at 02:07 pm
If you think my article is useful to you, please feel free to appreciate

Leave a Comment