linux - 编译的程序找不到库

标签 linux prolog swi-prolog

首先:我是一个新手。
我有一个引发此错误的编译程序:

ERROR: pl2xpce: cannot open shared object file: No such file or directory
ERROR: Failed to initialise the XPCE tookit.  This is normally
ERROR: caused by a missing or incompatible X11 library.
ERROR: See http://www.swi-prolog.org/build/issues/xpce.html
ERROR: Sorry, cannot recover from this.  Process terminates. 

我已阅读 here也许图书馆被放置在外国搜索路径之外的某个地方。我的库放在 /usr/lib/swi-prolog/lib/amd64/pl2xpce.so 中。所以,我的问题:

  • 如何检查哪个是外部路径?
  • 如何让我的程序找到这个库?

我在 Ubuntu 13.10 机器上使用 SWI Prolog 的开发版本。
提前致谢。

编辑:我在 SWI-Prolog mailing list 上发布了完全相同的问题并按照他们的建议,我刚刚切换回 稳定 版本。现在一切似乎都正常了。

最佳答案

  1. 库路径一般配置在/etc/ld.so.conf.d/目录下, 在我的机器上,/etc/ld.so.conf 文件包含该目录下的所有 .conf 文件

    ➜ 数据分析 git:(master) cat/etc/ld.so.conf

    包括/etc/ld.so.conf.d/*.conf

  2. 所以你可以在/etc/ld.so.conf.d/下创建另一个 conf 文件(例如 prolog.conf 其中包含 prolog 库的路径)然后运行 sudo ldconfig命令更新ld路径

关于linux - 编译的程序找不到库,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25687294/

相关文章:

linux - 如何将 Crashpad 与 Linux 中的守护程序应用程序集成?有实现指南吗?

linux - 将度坐标转换为十进制

Prolog - 关闭 SWI-prolog 时无限循环

list - 检查某些东西是否是 Prolog 中嵌套列表中的成员

prolog - 在 prolog xpce 中显示单选按钮

html - 如何取消转义 Prolog 中的 html 属性值?

c++ - 如何使用 C++ 在 Linux 中检查 USB 端口并提供设备(内存等)信息

c - 如何使用原始套接字 ping 本地主机?

Prolog - 对递归规则的返回结果感到困惑

尝试 3000 多次后 mysql 连接失败