由於要學習的代碼中用到了yaml-cpp,因此在此記錄一下安裝過程,翻譯自:stackoverflow。
關於yaml-cpp可以看一下yaml,yaml-cpp來了解一下。
首先刪除本地原有的yaml-cpp庫:
The installer just copies the header files to the directory $PREFIX/include/yaml-cpp and the library files to $PREFIX/lib/libyaml-cpp.so. ($PREFIX is probably /usr/local)
Just remove the header directory and the library files and it should be uninstalled.
翻譯一下這意思就是安裝僅僅是將一些頭文件拷貝到$PREFIX/include/yaml-cpp;將一些庫文件拷貝到$PREFIX/lib,比如libyaml-cpp.so($PREFIX在Ubuntu下一般是/usr/local)。
因此將頭文件目錄和這些庫文件刪除掉,那么就算完成了卸載。
然后是yam-cpp的安裝,這里說的是利用源碼進行安裝的方式:
git clone https://github.com/jbeder/yaml-cpp.git mkdir build cd build cmake -DBUILD_SHARED_LIBS=ON .. make sudo make install
這樣就算完成了yaml-cpp的安裝。
