一、下載jsoncpp源碼git
wget https://github.com/open-source-parsers/jsoncpp/archive/master.zip
二、解壓縮源碼文件github
unzip -x master.zip
三、cmake源碼安裝jsoncpp
https://github.com/open-source-parsers/jsoncpp/wiki/Buildingjson
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仍然提示權限問題,最後直接切換rootui
make && make install
安裝成功debug