jq configure: error: You need bison version 3.0 or greater
Issue
Download the jq source and configure, run the commands blew.
$ git clone https://github.com/stedolan/jq.git
$ cd jq
$ git submodule update --init
$ ./configure --prefix=/Volumes/develop/opt/jq
But the following error occurs.
checking for bison version... 2.3
configure: error: You need bison version 3.0 or greater, or use --disable-maintainer-mode.
Solution
It needs to install bison
3.0 or above.
In Mac OS or Linux, we can install bison
from source code. Go to https://www.gnu.org/software/bison/ and download the newest source, for example bison-3.6.tar.xz
.
$ wget ftp://ftp.gnu.org/gnu/bison/bison-3.6.tar.xz
$ tar xf bison-3.6.tar.xz
$ cd bison-3.6
$ ./configure
$ make
$ make install