centos7.6系统安装jq1.6

环境:centos7.6 x86_64位 最小化安装

下载包,编译安装

wget https://github.com/stedolan/jq/releases/download/jq-1.6/jq-1.6.tar.gz
tar xf jq-1.6.tar.gz
cd jq-1.6
./configure 
  • 1.
  • 2.
  • 3.
  • 4.

提示:
此处编译安装一直提示:
still complains about this using “configure”:
=== configuring in modules/oniguruma (/root/jq-1.6/modules/oniguruma)
configure: WARNING: no configuration information is in modules/oniguruma
如果继续往下make会报错,

解决办法:

[root@mysql-redis jq-1.6]# autoreconf -fi 
libtoolize: putting auxiliary files in `.'.
libtoolize: copying file `./ltmain.sh'
libtoolize: putting macros in AC_CONFIG_MACRO_DIR, `m4'.
libtoolize: copying file `m4/libtool.m4'
libtoolize: copying file `m4/ltoptions.m4'
libtoolize: copying file `m4/ltsugar.m4'
libtoolize: copying file `m4/ltversion.m4'
libtoolize: copying file `m4/lt~obsolete.m4'
configure.ac:6: error: require Automake 1.14, but have 1.13.4
autoreconf: automake failed with exit status: 1
  • 1.
  • 2.
  • 3.
  • 4.
  • 5.
  • 6.
  • 7.
  • 8.
  • 9.
  • 10.
  • 11.

但是报错如下:
configure.ac:6: error: require Automake 1.14, but have 1.13.4

于是下载:

http://ftp.gnu.org/gnu/automake/automake-1.14.tar.xz
tar -xJvf automake-1.14.tar.xz
cd automake-1.14 
./configure
make && make install
  • 1.
  • 2.
  • 3.
  • 4.
  • 5.

继续如下:


[root@mysql-redis jq-1.6]# autoreconf -fi 
libtoolize: putting auxiliary files in `.'.
libtoolize: copying file `./ltmain.sh'
libtoolize: putting macros in AC_CONFIG_MACRO_DIR, `m4'.
libtoolize: copying file `m4/libtool.m4'
libtoolize: copying file `m4/ltoptions.m4'
libtoolize: copying file `m4/ltsugar.m4'
libtoolize: copying file `m4/ltversion.m4'
libtoolize: copying file `m4/lt~obsolete.m4'
libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, `config'.
libtoolize: copying file `config/ltmain.sh'
libtoolize: putting macros in AC_CONFIG_MACRO_DIR, `config/m4'.
libtoolize: copying file `config/m4/libtool.m4'
libtoolize: copying file `config/m4/ltoptions.m4'
libtoolize: copying file `config/m4/ltsugar.m4'
libtoolize: copying file `config/m4/ltversion.m4'
libtoolize: copying file `config/m4/lt~obsolete.m4'
  • 1.
  • 2.
  • 3.
  • 4.
  • 5.
  • 6.
  • 7.
  • 8.
  • 9.
  • 10.
  • 11.
  • 12.
  • 13.
  • 14.
  • 15.
  • 16.
  • 17.
  • 18.

采用如下方式再次编译,可以成功解决报错:

[root@mysql-redis39 jq-1.6]# ./configure   --disable-maintainer-mode
[root@mysql-redis39 jq-1.6]# make
[root@mysql-redis39 jq-1.6]# echo $?
[root@mysql-redis39 jq-1.6]# make install
  • 1.
  • 2.
  • 3.
  • 4.

验证安装:

[root@mysql-redis ~]# /usr/local/bin/jq -V
jq-1.6
  • 1.
  • 2.

参考文档
 https://github.com/stedolan/jq/issues/1930

posted @ 2020-05-30 22:24  勤奋的蓝猫  阅读(9)  评论(0编辑  收藏  举报  来源