27

So it reads here:

jq 1.5 is in the official Debian and Ubuntu repositories. Install using sudo apt-get install jq.

yet:

$ 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.

AND:

$ jq --version
jq version 1.3

Description:    Ubuntu 14.04 LTS
Release:    14.04
Codename:   trusty

What am I missing?

thanks

7
  • Have you tried sudo apt-get update and sudo apt-get upgrade?
    – TheCrimulo
    Apr 6, 2016 at 21:55
  • 1
    yes. It upgraded my chrome, but jq is still the same (1.3) Apr 6, 2016 at 22:02
  • Try with apt-get install --only-upgrade <packagename>, to make sure, what's the package that is not upgraded?
    – TheCrimulo
    Apr 6, 2016 at 22:05
  • Had already tried. No luck: $ sudo apt-get install --only-upgrade 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 0 not upgraded. Apr 6, 2016 at 22:07
  • 1
    yes, downloading the binary and very rudely replacing /usr/bin/jq with the new binary did the trick. I was hoping in something more ubuntista but thanks. Apr 7, 2016 at 0:25

3 Answers 3

44

I ended up here when googling on why my Debian 8 instance does not upgrade jq 1.4 to 1.5.

Here's my solution for anyone struggling with Debian 8 jq: Download jq from https://github.com/stedolan/jq/releases and copy it manually over the currently installed jq. In my case:

wget https://github.com/stedolan/jq/releases/download/jq-1.5/jq-linux64
chmod +x jq-linux64
sudo mv jq-linux64 $(which jq)
1
  • 5
    Upvoted because it worked, not because I liked it :)
    – mhvelplund
    Nov 2, 2018 at 7:08
4

You're using Ubuntu LTS. The latest version of Ubuntu does have jq 1.5.

3
  • 3
    So how can easily get jq 1.4 or 1.5 for ubuntu 14.04 LTS ?
    – Nati
    Aug 30, 2016 at 7:57
  • 1
    @Nati Your question has already been answered on Ask Ubuntu: askubuntu.com/questions/103320/…
    – user3899165
    Aug 30, 2016 at 10:57
  • 3
    This may be the answer, but I don't understand it. It seems like "master apt-get" is the advice. Jan 5, 2017 at 18:44
0

I think you were missing the correct repo: http://installion.co.uk/ubuntu/vivid/universe/j/jq/install/index.html

1
  • No he has Ubuntu 14 and not 15.
    – ceving
    Apr 12, 2017 at 8:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.