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
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
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"
}
sudo apt-get update
spit out some errors like "Some index files failed to download. They have been ignored, or old ones used instead." and sudo apt-get install jq
still fails afterwards. How to go about fixing this (Ubuntu 17.04)? Automatic updates fail as well, telling me to check my network connection, but other internet access works fine (Git, Firefox, ...). It is running in a VM btw. β
Colb apt-get install jq
just now on a Raspberry PI without altering sources.list
β
Freehand E: Couldn't find package jq
until I did sudo apt-get update
. So for versions 14+ it's better to start from step 3. β
Fibrillation Since Ubuntu 16.04LTS xenial you do not need to modify /etc/apt/sources.list
, just run
sudo apt-get install jq
I think you're missing the repo: http://installion.co.uk/ubuntu/vivid/universe/j/jq/install/index.html
Download & build from source as described in https://stedolan.github.io/jq/download/, last section called "From source on Linux, OS X, Cygwin, and other POSIX-like operating systems".
If you don't have sudo permission do this:
#!/usr/bin/env bash
# conda activate jq_install_env
# - Install jq without sudo
# Clone the jq repository from GitHub
cd $HOME
git clone https://github.com/stedolan/jq.git $HOME/jq
cd $HOME/jq
git submodule update --init
# Compile jq from source
cd $HOME/jq
autoreconf -fi
./configure --with-oniguruma=builtin --disable-maintainer-mode --prefix=$HOME/.local
make -j8 && make check
make install
ls $HOME/.local
ls $HOME/.local/bin
# Add the directory where the jq binary file is located to your PATH environment variable
echo 'PATH=$PATH:~/.local/bin/' >> $HOME/.bashrc.lfs
export PATH=$PATH:~/.local/bin/
echo $PATH | tr ':' '\n'
# Reload your shell configuration file to update your PATH environment variable
source $HOME/.bashrc.lfs
# Verify that jq is installed and working
jq --version
reference: https://suzyahyah.github.io/misc/2020/03/31/jq-without-sudo.html
in case link dies:
Landing Page...
AboutCategoriesAdvisors
Recipe for building jq from source without admin(sudo) rights
Mar 31, 2020
This took me some time to install. Just putting it out there in case it helps someone.
Get the latest jq from github
git clone https://github.com/stedolan/jq.git
Update submodules (onigurama)
git submodule update --init
Copy missing auxiliary files
autoreconf -fi
Install into {YOUR_HOME_DIR} with onigurama (regex library)
./configure --with-oniguruma=builtin --disable-maintainer-mode --prefix={YOUR_HOME_DIR}.local
Check that we have all the dependencies downloaded and install
make -j8 && make check
make install
Finally, add this to your ~/.bashrc and to call jq from anywhere. Remember to >source ~/.bashrc and you should be good to go.
export PATH=$PATH:~/.local/bin/
Β« The Sigmoid in Regression, Neural Network Activation and LSTM GatesA minimum keystroke (py)Debugger for Lazy ML/DS people who don't IDE Β»
Quality means doing it right when no one is looking - Henry Ford
suzyahyah
suzyahyah
The best time to plant a tree was 20 years ago. The second best time is now. - Japanese proverb
Since October 2017
© 2022 - 2024 β McMap. All rights reserved.