升压错误加载共享库 [英] Error loading shared libraries of boost
问题描述
我工作在CentOS。我在我的系统上安装提振版本1.45.0。该程序被编译正确,但每当我键入命令来查看输出它提供了以下错误:
./ a.out的:错误而载入共享库:
libboost_thread.so.1.45.0:无法打开共享对象文件:没有
文件或目录
块引用>解决方案您是如何安装Boost库?
你可能会遇到的问题是,该连接器找不到库,当你建立你的程序,您必须手动指定其他库路径搜索库。
一个速战速决你能做的就是设置
LD_LIBRARY_PATH
来包括目录下,升压线程库是:
导出LD_LIBRARY_PATH = /路径/要/升压/库:$ LD_LIBRARY_PATH
./ runExecutable
I am working on centos. I installed boost version 1.45.0 on my system. The programs are compiled correctly but whenever I type command to see output it gives following error:
./a.out: error while loading shared libraries: libboost_thread.so.1.45.0: cannot open shared object file: No such file or directory
解决方案How did you install the boost libraries?
The problem you're likely having is that the linker can not find the libraries, and when you built your program, you had to manually specify additional library paths to search for libraries.
A quick fix you can do is to set
LD_LIBRARY_PATH
to include the directory where the boost thread library is:
export LD_LIBRARY_PATH=/path/to/boost/libs:$LD_LIBRARY_PATH
./runExecutable
这篇关于升压错误加载共享库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!