背景

编译Protobuf-2.5.0版本的时候执行configure没有问题,配置过程可以顺利通过但是在make阶段出现“WARNING: 'aclocal-1.15' is missing on your system.”异常导致编译过程中断。

CDPATH="${ZSH_VERSION+.}:" && cd . && /bin/sh /home/exakit/protobuf/missing aclocal-1.15 -I m4
/home/exakit/protobuf/missing:行81: aclocal-1.15: 未找到命令
WARNING: 'aclocal-1.15' is missing on your system.
         You should only need it if you modified 'acinclude.m4' or
         'configure.ac' or m4 files included by 'configure.ac'.
         The 'aclocal' 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/>
make: *** [aclocal.m4] 错误 127

解决方法

方式一

检查一下操作系统中automake版本:

[root@workstation protobuf-2.5.0]# automake --version
automake (GNU automake) 1.13.4
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>.

发现本机的版本确实低了一些,但是编译protobuf的机器好多人在用,为了不影响其他人使用在automake版本相差不大的情况下可以选择重新生成一下相关的宏,然后再重新configure、编译就可以了。

[root@workstation protobuf-2.5.0]# autoreconf -f -i

方式二

通过源代码直接升级到目标版本:

#下载目标版本源代码
[root@workstation packages]# wget https://ftp.gnu.org/gnu/automake/automake-1.15.tar.gz

#解压文件:
[root@workstation packages]# tar -xzvf automake-1.15.tar.gz

#构建并安装:

[root@workstation packages]# cd automake-1.15
[root@workstation automake-1.15]# ./configure  --prefix=/opt/aclocal-1.15
[root@workstation automake-1.15]# make
[root@workstation automake-1.15]# mkdir -p /opt
[root@workstation automake-1.15]# make install

#添加环境变量:

[root@workstation automake-1.15]# export PATH=/opt/aclocal-1.15/bin:$PATH
[root@workstation automake-1.15]# aclocal --version
aclocal (GNU automake) 1.15

 

声明
1.本网站名称: 盲盒博客
2.本站永久网址:https://exakit.com
3.本网站的文章部分内容可能来源于网络,仅供大家学习与参考,如有侵权,请联系站长support@exakit.com
4.本站一切资源不代表本站立场,并不代表本站赞同其观点和对其真实性负责
5.本站一律禁止以任何方式发布或转载任何违法的相关信息,访客发现请向站长举报
6.本站资源大多存储在云盘,如发现链接失效,请联系我们我们会第一时间更新