gpt4 book ai didi

linux - libudunits2 需要 libexpat.so.0,不接受 libexpat.so.1

转载 作者:太空宇宙 更新时间:2023-11-04 04:15:29 25 4
gpt4 key购买 nike

  • 操作系统:Ubuntu 12.04 64 位(Precise)
  • 机器:x86_64、Intel Centrino 2(2 核)、4 GB RAM
  • 涉及的库:libudunits2.so.0.1.0、libexpat.so.0、libexpat.so.1

问题描述...

我已经在 RedHat 5 机器上构建了 libudunits2.so.0.1.0 以及一个程序它使用它。我正在尝试在 Ubuntu 12.04 上重建或运行它。

RedHat机器安装了libexpat.so.0,这就是libudunits是用.

当我尝试在我的 Ubuntu 机器上使用 udunits2 进行构建时,构建失败,并解释说找不到 libexpat.so.0。Ubuntu 机器已安装 libexpat.so.1。

尝试构建(或运行预构建的二进制文件)会导致提示找不到 libexpat.so.0。当链接可执行文件时,我们发现是libudunits2需要libexpat.so.0。

我已经确认所有库都有正确的 SOname。 ldd 和 objdump -x 没有透露 libudunits 不应该接受 libexpat.so.1 而不是的任何原因libexpat.so.0,因为共享库通常是向后兼容的。 (有关更多详细信息,请参阅帖子末尾的命令输出)

也许 libexpat 在这两个版本之间没有向后兼容性?

也许我错过了其他东西?

注意:我在 Ubuntu 12.04 上使用的 libudunits 是从 RedHat 5 复制过来的。

命令输出...

REDHAT 5...
===========
bash$ ldd libudunits2.so | grep expat
libexpat.so.0 => /lib/libexpat.so.0 (0xf7efc000)

bash$ objdump -x libudunits2.so | grep expat
NEEDED libexpat.so.0


UBUNTU 12.04...
===============
bash$ ldd libudunits2.so | grep expat
libexpat.so.0 => not found

bash$ objdump -x libudunits2.so | grep expat
NEEDED libexpat.so.0

最佳答案

我的一位同事刚刚通知我,主要 SOnumber 的更改反射(reflect)了两个版本之间的不兼容,而次要 SOnumber 则不然。

所以,如果是libexpat.so.0.0和libexpat.so.0.1,就不会有问题,但一旦从libexpat.so.0变成libexpat.so.1,就意味着不兼容。

关于linux - libudunits2 需要 libexpat.so.0,不接受 libexpat.so.1,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16658306/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com