"Jsonlint: Command Not Found", Although Jsonlint Is Installed

"Jsonlint: Command Not Found", Although Jsonlint Is Installed

I am interested in using jsonlint on commandline in my Ubuntu 16.04 OS. So I executed

sudo apt-get install jsonlint

and I got

Reading package lists... Done
Building dependency tree       
Reading state information... Done
jsonlint is already the newest version (1.4.0-1build1).
0 upgraded, 0 newly installed, 0 to remove and 20 not upgraded.

But then when I tried to execute

jsonlint -v packets.json

I got

jsonlint: command not found

Why? How do I fix this?

0

3 Answers

The command is called jsonlint-php

You could also try a different way to use jsonlint.

$ sudo apt-get install python-demjson
$ jsonlint-py -f packets.json 

On Ubuntu 20.04.4 (focal) LTS (on WSL) the package name has changed for python3 and it maps to the normal jsonlint name:

$ sudo apt-get install python3-demjson
$ jsonlint -f packets.json 

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Sarah Jenkins
Author

Sarah Jenkins

Sarah Jenkins is a veteran tech journalist with over 12 years of experience covering artificial intelligence, mobile innovations, and digital ethics. Her insights have appeared in leading technology publications worldwide.