Centos7安装jq

  1. jq可以给shell提供json解析功能,但托管在epel仓库
yum -y install epel-release
yum clean all
yum makecache
yum -y install jq
  1. 若安装过程遇到如下问题:

yum Cannot retrieve metalink for repository: epel/x86_64

解决办法:既然不能用https的仓库,那就直接使用http吧,epel也正好支持http+https两种方式,然后清理,重新安装:

# 将https转为http
sed -i 's#https://#http://#g' /etc/yum.repos.d/epel*repo
yum clean all
yum makecache
yum -y install jq
posted @ 2020-07-24 17:29  JaxYoun  阅读(1416)  评论(0编辑  收藏  举报