升压错误加载共享库 [英] Error loading shared libraries of boost

查看:145
本文介绍了升压错误加载共享库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我工作在CentOS。我在我的系统上安装提振版本1.45.0。该程序被编译正确,但每当我键入命令来查看输出它提供了以下错误:


  

./ a.out的:错误而载入共享库:
  libboost_thread.so.1.45.0:无法打开共享对象文件:没有
  文件或目录



解决方案

您是如何安装Boost库?

你可能会遇到的问题是,该连接器找不到库,当​​你建立你的程序,您必须手动指定其他库路径搜索库。

一个速战速决你能做的就是设置 LD_LIBRARY_PATH 来包括目录下,升压线程库是:

导出LD_LIBRARY_PATH = /路径/要/升压/库:$ LD_LIBRARY_PATH

./ runE​​xecutable

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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆