jq 编译错误 autoreconf: failed to run aclocal: No such file or directory

Linux 2020-06-18 阅读 52 评论 0

问题描述

下载并编译 jq,运行以下命令。

$ git clone https://github.com/stedolan/jq.git
$ cd jq
$ git submodule update --init
$ autoreconf -fi

最后报错了。

$ autoreconf -fi
Can't exec "aclocal": No such file or directory at /usr/local/Cellar/autoconf/2.69/share/autoconf/Autom4te/FileUtils.pm line 326.
autoreconf: failed to run aclocal: No such file or directory

解决方法

需要安装 automake

源代码安装

Mac/Linux 系统可以尝试源码安装,前往 https://www.gnu.org/software/automake/#TOCdownloading 下载 automake 源码。

$ wget ftp://ftp.gnu.org/gnu/automake/automake-1.16.tar.xz
$ tar xf automake-1.16.tar.xz 
$ cd automake-1.16
$  ./configure
$ make
$ make install

命令行安装

  • Ubuntu/Debian
sudo apt-get install automake
  • RHEL/CentOS

对于 Linux 8,可以直接运行 yum

sudo yum install automake

Linux 7及以下版本,前往 https://pkgs.org/search/?q=automake,下载非官方版本。如 Centos 7。

$ wget http://repo.okay.com.mx/centos/7/x86_64/release/automake-1.14-1.el7.x86_64.rpm
$ sudo yum install automake-1.14-1.el7.x86_64.rpm
最后更新 2020-07-17
MIP.watch('startSearch', function (newVal, oldVal) { if(newVal) { var keyword = MIP.getData('keyword'); console.log(keyword); // 替换当前历史记录,新增 MIP.viewer.open('/s/' + keyword, {replace: true}); setTimeout(function () { MIP.setData({startSearch: false}) }, 1000); } }); MIP.watch('goHome', function (newVal, oldVal) { MIP.viewer.open('/', {replace: false}); });