Is there a way to install jq JSON processor on Ubuntu 10.04?
I Tried the usual sudo apt-get install jq
but got the error E: Couldn't find package jq
Linux. jq 1.5 is in the official Debian and Ubuntu repositories. Install using sudo apt-get install jq .
jq, a command-line JSON processor, self-described as sed for JSON data, allows users to slice, transform and recombine structured data â with a friendly interface.
jq package in Ubuntu jq: lightweight and flexible command-line JSON processor. jq-dbgsym: debug symbols for jq. libjq-dev: lightweight and flexible command-line JSON processor - development files. libjq1: lightweight and flexible command-line JSON processor - shared library.
It is possible to perform sudo apt-get install jq
however you need to inform the system where to find jq.
âšī¸ Note: Ubuntu 14+ users can skip to step 3! đ
Open your sources file in a text editor:
sudo vim /etc/apt/sources.list
Add the following line to the end of that file (note deb
is not a command, more info):
deb http://us.archive.ubuntu.com/ubuntu vivid main universe
Then re-index apt-get so that it can find jq
:
sudo apt-get update
Then do the normal install and you should be the proud new user of jq
!
sudo apt-get install jq
Test it works! Try this to see it pretty print some example json
echo '{ "name":"John", "age":31, "city":"New York" }' | jq .
The result should appear like so in your terminal:
{ "name": "John", "age": 31, "city": "New York" }
Since Ubuntu 16.04LTS xenial you do not need to modify /etc/apt/sources.list
, just run
sudo apt-get install jq
jq 1.5
is in the official Debian and Ubuntu repositories.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With