libthrift-0.9.1.so:无法打开共享对象文件:没有这样的文件或目录 [英] libthrift-0.9.1.so: cannot open shared object file: No such file or directory

查看:116
本文介绍了libthrift-0.9.1.so:无法打开共享对象文件:没有这样的文件或目录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经使用git仓库安装了旧版0.9.1
创建节俭后,我启动了预编译的cpp服务器和php客户端。这个预编译的例子很好用。

I have installed thrift 0.9.1 using the git repository. After building thrift I started the precompiled cpp Server and and the php client. This precompiled examples worked fine.

现在,我正在按照本教程尝试编译自己的cpp服务器( http://wiki.apache.org/thrift/ThriftUsageC++ )。我使用的

Now I am trying to compile my own cpp Server by following this tutorial (http://wiki.apache.org/thrift/ThriftUsageC++). I used:

g ++ -DHAVE_INTTYPES_H -DHAVE_NETINET_IN_H -Wall -I / usr / local / include / thrift * .cpp -L / usr / local / lib -lthrift -o某事

编译服务器而不会出错。

to compile the server which worked without errors.

当我通过键入 ./ something 执行服务器时,在加载共享库时出现错误:libthrift-0.9.1。因此:无法打开共享对象文件:没有这样的文件或目录

When I execute the server by typing ./something I get error while loading shared libraries: libthrift-0.9.1.so: cannot open shared object file: No such file or directory.

在lib目录中有以下文件:

In the lib directory are the following files:


  • libthrift.a

  • libtrift.la

  • libthrift.so

  • libtthrift-0.9.0.so

  • libtthrift-0.9.1.so

  • libthrift.a
  • libtrift.la
  • libthrift.so
  • libtthrift-0.9.0.so
  • libtthrift-0.9.1.so

还有 libthrift_c.glib.a libthriftnb.a libthriftz.a 和属于它们的文件,但我认为它们对于此错误并不重要。

There are also libthrift_c.glib.a, libthriftnb.a and libthriftz.a and the files which belong to them, but I think they are not important for this error.

有人知道这是什么

Thx寻求帮助

推荐答案

使用动态库( -lthrift )时,Linux搜索包含环境变量 LD_LIBRARY_PATH 中目录中的> libthrift.so ,必须确保该目录包含 libthrift.so 已在环境变量 LD_LIBRARY_PATH 中正确设置。

When a dynamic library is used (-lthrift), Linux searches for the directory containing libthrift.so in the directories within the environment variable LD_LIBRARY_PATH, you must make sure that the directory containing libthrift.so is setup correctly in the environment variable LD_LIBRARY_PATH.

这篇关于libthrift-0.9.1.so:无法打开共享对象文件:没有这样的文件或目录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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