在 Ubuntu 将 jq 升级到 1.5

Upgrading jq to 1.5 on Ubuntu

所以它显示为 here:

jq 1.5 在官方 Debian 和 Ubuntu 存储库中。使用 sudo apt-get install jq 安装。

还:

$ sudo apt-get install jq
Reading package lists... Done
Building dependency tree       
Reading state information... Done
jq is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.

和:

$ jq --version
jq version 1.3

Description:    Ubuntu 14.04 LTS
Release:    14.04
Codename:   trusty

我错过了什么?

谢谢

您正在使用 Ubuntu LTS。 Ubuntu 的最新版本确实有 jq 1.5。

我认为您错过了正确的回购协议:http://installion.co.uk/ubuntu/vivid/universe/j/jq/install/index.html

当我在谷歌上搜索为什么我的 Debian 8 实例没有升级 jq 1.4 到 1.5 时,我最终来到了这里。

这是我为 Debian 8 jq 苦苦挣扎的人的解决方案:从 https://github.com/stedolan/jq/releases 下载 jq 并手动将其复制到当前安装的 jq 上。就我而言:

wget https://github.com/stedolan/jq/releases/download/jq-1.5/jq-linux64
chmod +x jq-linux64
sudo mv jq-linux64 $(which jq)