"fatal error: jsoncpp/json/json.h: No such file or directory"
How can I fix this problem?
The error indicates that you are missing JsonCpp development files (i.e., JsonCpp library and header files). JsonCpp is a C++ library for JSON-formatted data manipulation. Here is how to install JsonCpp development files on various Linux distros.
On Debian, Ubuntu or Linux Mint:
On Fedora or CentOS/RHEL 7 or higher:
On CentOS/RHEL 6 or lower, JsonCpp is not available as a pre-built package. So you can build and install JsonCpp from the source as follows.
$ git clone https://github.com/open-source-parsers/jsoncpp.git
$ cd jsoncpp
$ mkdir -p build/debug
$ cd build/debug
$ cmake -DCMAKE_BUILD_TYPE=debug -DJSONCPP_LIB_BUILD_SHARED=OFF -G "Unix Makefiles" ../../
$ sudo make install
Subscribe to Ask Xmodulo
Do you want to receive Linux related questions & answers published at Ask Xmodulo? Enter your email address below, and we will deliver our Linux Q&A straight to your email box, for free. Delivery powered by Google Feedburner.
Did you find this tutorial helpful? Then please be generous and support Xmodulo!