Last updated on June 20, 2020 by Dan Nanni
fatal error: jsoncpp/json/json.h: No such file or directoryHow 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.
$ sudo apt-get install libjsoncpp-dev
$ sudo yum install jsoncpp-devel
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.
$ sudo yum install cmake $ 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" ../../ $ make $ sudo make install
This website is made possible by minimal ads and your gracious donation via PayPal or credit card
Please note that this article is published by Xmodulo.com under a Creative Commons Attribution-ShareAlike 3.0 Unported License. If you would like to use the whole or any part of this article, you need to cite this web page at Xmodulo.com as the original source.