Ubuntu下yaml-cpp的安装

因为要学习的代码中用到了yaml-cpp,所以在此记录一下安装过程,翻译自:stackoverflowhtml

关于yaml-cpp能够看一下yamlyaml-cpp来了解一下。git

首先删除本地原有的yaml-cpp库:github

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)post

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)。ui

所以将头文件目录和这些库文件删除掉,那么就算完成了卸载。spa

而后是yam-cpp的安装,这里说的是利用源码进行安装的方式:.net

git clone https://github.com/jbeder/yaml-cpp.git
mkdir build
cd build
cmake -DBUILD_SHARED_LIBS=ON ..
make
sudo make install

这样就算完成了yaml-cpp的安装。翻译

相关文章
相关标签/搜索