Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Facing issue while installing jq in centos

Tags:

jq

centos

While installing jq on centos, I am experiencing an issue. I have run the following commands:

yum groupinstall "Development Tools"
yum install autoconf automake libtool python

after that I have used pip install jq and I was facing error like this:

jq.c:8:22: fatal error: pyconfig.h: No such file or directory
#include "pyconfig.h"
                     ^
compilation terminated.
error: command 'gcc' failed with exit status 1

----------------------------------------
Command "/usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-akuaZu/jq/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read                                                                                        ().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" 
instal --record /tmp/pip-04CW9h-record/install-record.txt --single-version-externally  
-managed --compile" failed with error code 1 in /tmp/pip-build-akuaZu/jq/

Can anyone help me??

like image 255
rishabhjitani Avatar asked Aug 31 '25 18:08

rishabhjitani


1 Answers

Just in case if someone is looking for a different solution.

This is how I installed in Cent OS 7 and it worked. Ensure you have sudo privilege.

Installer solution

yum install epel-release -y
yum install jq -y
jq --version

output was jq-1.5

Reference

like image 67
Santosh Kumar Arjunan Avatar answered Sep 03 '25 12:09

Santosh Kumar Arjunan