编译protobuf-3.11.4 错误: aclocal-1.15: command not found的解决办法

本文讲述了作者在编译protobuf时遇到aclocal版本不匹配的问题,通过查找并修改configure文件中的aclocal版本号,最终成功编译的过程。

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

操作系统:kylinV10
protobuf版本:3.11.4

当编译protobuf时,执行以下命令:

./configure --prefix=$LEAN/protobuf3.11.4

出现以下错误:

CDPATH="${ZSH_VERSION+.}:" && cd . && /bin/sh /data3/deepblue/projects/build/protobuf-3.11.4/missing aclocal-1.15 -I m4
/data3/deepblue/projects/build/protobuf-3.11.4/missing: line 81: aclocal-1.15: command not found
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: *** [Makefile:1683: aclocal.m4] Error 127

貌似是缺少了aclocal-1.15这个程序,然后我就开始查询系统中是否安装了aclocal。命令行输入以下执行:

aclocal --version

输出以下内容:

aclocal (GNU automake) 1.16.2
Copyright (C) 2020 Free Software Foundation, Inc.
License GPLv2+: GNU GPL version 2 or later <https://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>.

可以看到,本机器上的aclocal版本过高(1.16>1.15),于是想到有两个解决办法:
1.修改configure文件里对aclocal版本的版本号。
2.在本机安装aclocal-1.15

因为考虑到安装aclocal-1.15是把版本降低了,我决定选择1,去改configure文件

打开configure文件,查找aclocal关键字,发现相关内容:

ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}

于是再查找am__api_version,发现版本号的具体内容:

am__api_version='1.15'

于是尝试着把1.15修改成1.16,如下所示:

am__api_version='1.16'

修改后,保存文件,继续执行以下命令:

./configure --prefix=$LEAN/protobuf3.11.4

编译成功,鼓掌。

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

村北头的码农

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值