WARNING: ‘automake-1.14‘ is missing on your system.

本文解决在Ubuntu18上因automake版本不匹配导致的编译错误,提供了创建软链接及降级automake版本两种解决方案。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

在 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>.
原因
尝试了命令 automakeautomake-1.14automake-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.14aclocal-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

### 如何安装或配置 automake-1.14 #### 下载 Automake 源码包 为了获取 `automake` 的源文件,可以使用 wget 工具下载指定版本的压缩包。对于 1.14 版本而言: ```bash wget http://ftp.gnu.org/gnu/automake/automake-1.14.tar.gz ``` 此操作会将目标文件保存到当前目录下[^4]。 #### 解压并准备编译环境 接着需要解压缩刚刚下载得到的 `.tar.gz` 文件至 `/opt/` 路径中去: ```bash tar -zxvf automake-1.14.tar.gz -C /opt/ ``` 这一步骤能够把所有必要的构建脚本放置在一个固定位置以便后续处理[^1]。 #### 编译与安装过程 进入已解压后的软件包所在路径,并按照常规流程完成其本地化设置以及最终部署工作: ```bash cd /opt/automake-1.14 ./configure --prefix=/usr/local/ make && make install ``` 上述指令序列首先通过运行 `./configure` 来检测系统的兼容性和依赖关系;之后利用 `make` 构建程序本身及其文档资料;最后借助于 `make install` 将新生成的应用组件复制到系统预设的位置上[^3]。 #### 更新 Shell 配置使更改立即生效 为了让刚加入的新工具可以在命令行界面被识别出来,需刷新 shell 环境变量或是重新启动终端模拟器窗口来加载最新的修改结果: ```bash source ~/.bashrc # 或者如果是全局范围内的变动,则应采用下面这条语句代替之 sudo source /etc/bash.bashrc ``` 此外还可以考虑调用 `updatedb` 命令重建 locate 数据库索引从而加快查找速度[^5]。
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值