linux报错error while loading shared libraries: libboost_program_options.so.1.67.0: cannot open shared

  • 报错./roSettleServer: error while loading shared libraries: libboost_program_options.so.1.67.0: cannot open shared object file: No such file or directory。

  • 说明机器里面缺乏libboost_program_options.so.1.67.0这个库。

  • 以下这两个网站都可以下载,你想要其他历史版本的也可以在里面找到。
    https://sourceforge.net/projects/boost/files/boost/1.67.0/
    https://archives.boost.io/release/1.67.0/source/

1,下载压缩包

wget https://sourceforge.net/projects/boost/files/boost/1.67.0/boost_1_67_0.tar.gz

2,解压

tar -zxvf boost_1_67_0.tar.gz

3,配置安装路径 & 编译安装,

cd boost_1_67_0 && chmod +x bootstrap.sh
./bootstrap.sh --prefix=/usr 或者 ./bootstrap.sh --prefix=/usr/local 
./b2 
sudo ./b2  install
sudo /bin/bash -c 'echo "/usr/local/lib" > /etc/ld.so.conf.d/boost.conf' 
sudo ldconfig
cat /usr/include/boost/version.hpp | grep "BOOST_LIB_VERSION"

4,检查一下系统里有没有这个库了

 ll /usr/lib/ | grep libboost_program_options

在这里插入图片描述

============================================================
创作不易,小小支持一下吧
在这里插入图片描述

猜你喜欢

转载自blog.csdn.net/qq_37263429/article/details/141397063