在 Ubuntu 18 上面编译的时候碰到了下面的错误信息:
WARNING: 'automake-1.14' is missing on your system.
You should only need it if you modified 'Makefile.am' or
'configure.ac' or m4 files included by 'configure.ac'.
The 'automake' program is part of the GNU Automake package:
<http://www.gnu.org/software/automake>
It also requires GNU Autoconf, GNU m4 and Perl in order to run:
<http://www.gnu.org/software/autoconf>
<http://www.gnu.org/software/m4/>
<http://www.perl.org/>
但是检查发现其实已经安装了automake,只不过版本是automake-1.15.1
$ automake --version
automake (GNU automake) 1.15.1
Copyright (C) 2017 Free Software Foundation, Inc.
License GPLv2+: GNU GPL version 2 or later <http://gnu.org/licenses/gpl-2.0.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Written by Tom Tromey <tromey@redhat.com>
and Alexandre Duret-Lutz <adl@gnu.org>.
-
原因
-
尝试了命令
automake,
automake-1.14 和
automake-1.15 后,发现缺少命令
automake-1.14
检查 /usb/bin 目录下也没有找到 automake-1.14
$ ls -al /usr/bin/ | grep automake
lrwxrwxrwx 1 root root 26 Sep 16 06:16 automake -> /etc/alternatives/automake
-rwxr-xr-x 1 root root 253317 Mar 25 23:44 automake-1.15
-
解决方法一
- 参考https://github.com/UBERTC/isl/issues/1,在 /usb/bin 目录为 automake-1.14 和 aclocal-1.14 创建软链接
$ sudo ln -s /usr/bin/automake-1.15 /usr/bin/automake-1.14
$ sudo ln -s /usr/bin/aclocal-1.15 /usr/bin/aclocal-1.14
如果 解决方法一 不能解决问题的话请参考 解决方法二
虽然建立软链接后有了命令 automake-1.14,但是编译的时候仍然有错误信息:
WARNING: 'automake-1.14' is probably too old.
You should only need it if you modified 'Makefile.am' or
'configure.ac' or m4 files included by 'configure.ac'.
The 'automake' program is part of the GNU Automake package:
<http://www.gnu.org/software/automake>
It also requires GNU Autoconf, GNU m4 and Perl in order to run:
<http://www.gnu.org/software/autoconf>
<http://www.gnu.org/software/m4/>
<http://www.perl.org/>
-
解决方法二
- 降级automake的版本到1.14
$ wget http://ftp.gnu.org/gnu/automake/automake-1.14.1.tar.gz
$ tar -xvf automake-1.14.1.tar.gz
$ cd automake-1.14.1
$ ./configure
$ make
$ sudo make install
降级后重新登录 Ubuntu,查看 automake 版本
$ automake --version
automake (GNU automake) 1.14.1
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv2+: GNU GPL version 2 or later <http://gnu.org/licenses/gpl-2.0.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Written by Tom Tromey <tromey@redhat.com>
and Alexandre Duret-Lutz <adl@gnu.org>.
附:降级过程可能会碰到以下问题:
help2man: can’t get `–help’ info from automake-1.14
help2man: can't get `--help' info from automake-1.14
Try `--no-discard-stderr' if option outputs to stderr
make: *** [doc/automake-1.14.1] Error 255
碰到上述错误提示可以参考https://www.cnblogs.com/zengjfgit/p/9178571.html
以下是我的解决Patch:
diff --git a/Makefile b/Makefile
index e01261c..176ccba 100644
--- a/Makefile
+++ b/Makefile
@@ -3704,7 +3704,7 @@ doc/aclocal.1 doc/automake.1:
doc/aclocal-$(APIVERSION).1: $(aclocal_script) lib/Automake/Config.pm
$(update_mans) aclocal-$(APIVERSION)
doc/automake-$(APIVERSION).1: $(automake_script) lib/Automake/Config.pm
- $(update_mans) automake-$(APIVERSION)
+ $(update_mans) automake-$(APIVERSION) --no-discard-stderr