1、下载jsoncpp源码
wget https://github.com/open-source-parsers/jsoncpp/archive/master.zip
2、解压缩源码文件
unzip -x master.zip
3、cmake源码安装jsoncpp
https://github.com/open-source-parsers/jsoncpp/wiki/Building
cd jsoncpp-master
mkdir -p ./build/debug
cd ./build/debug
cmake -DCMAKE_BUILD_TYPE=debug -DBUILD_STATIC_LIBS=ON -DBUILD_SHARED_LIBS=OFF -DCMAKE_INSTALL_INCLUDEDIR=include/jsoncpp -DARCHIVE_INSTALL_DIR=. -G "Unix Makefiles" ../..
sudo make && make install
安装时使用sudo仍然提示权限问题,最后直接切换root
make && make install
安装成功