首页 小组 文章 搜索 用户
全部 linux Nginx Apache PHP DNS windows 其它 同步与备份 js 数据库 前端 unix

centos安装yaml-cpp,configure: error: Could not find yaml-cpp

天边的云
发表于 2020-10-16 08:00:35

centos7安装yaml-cpp需要先安装cmake

yum update -y
yum -y install wget gcc gcc-c++ bzip2 autoconf automake make lua-devel libyaml libyaml-devel openssl openssl-devel boost-devel
wget https://cmake.org/files/v3.18/cmake-3.18.0.tar.gz
tar zxvf cmake-3.18.0.tar.gz
cd cmake-3.18.0
./configure
make&&make install

安装yaml-cpp

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

防止程序找不到yaml-cpp,复制到pkgconfig

cp /usr/local/share/pkgconfig/yaml-cpp.pc /usr/lib64/pkgconfig/ 

复制到lib64

cp /usr/local/lib64/libyaml-cpp.so.0.6 /usr/lib64


完成

125 0

评论