gpt4 book ai didi

ubuntu - ldd 不同的输出。相同的二进制文件不同的发行版

转载 作者:太空宇宙 更新时间:2023-11-03 17:15:32 26 4
gpt4 key购买 nike

当运行 ldd 实用程序来查找 httpd 的共享库时,我发现了以下我无法解释的情况:


在我的 Ubuntu 盒子上:

leon@lwaldman-linux:~/Uol/Lxc/py_utils/Container_Builder/_builds/usr/sbin$ ldd  httpd 
linux-gate.so.1 => (0xf77b2000)
libm.so.6 => /lib/i386-linux-gnu/libm.so.6 (0xf7712000)
libpcre.so.0 => not found
libselinux.so.1 => /lib/i386-linux-gnu/libselinux.so.1 (0xf76f2000)
libaprutil-1.so.0 => not found
libcrypt.so.1 => /lib/i386-linux-gnu/libcrypt.so.1 (0xf76c1000)
libexpat.so.1 => /lib/i386-linux-gnu/libexpat.so.1 (0xf7697000)
libdb-4.7.so => not found
libapr-1.so.0 => not found
libpthread.so.0 => /lib/i386-linux-gnu/libpthread.so.0 (0xf767b000)
libc.so.6 => /lib/i386-linux-gnu/libc.so.6 (0xf74d6000)
/lib/ld-linux.so.2 (0xf77b3000)
libdl.so.2 => /lib/i386-linux-gnu/libdl.so.2 (0xf74d1000)

CentOS 盒子上:

[root@localhost sbin]# ldd httpd 
linux-gate.so.1 => (0x008b6000)
libm.so.6 => /lib/libm.so.6 (0x0036f000)
libpcre.so.0 => /lib/libpcre.so.0 (0x00835000)
libselinux.so.1 => /lib/libselinux.so.1 (0x0021f000)
libaprutil-1.so.0 => /usr/lib/libaprutil-1.so.0 (0x00dfa000)
libcrypt.so.1 => /lib/libcrypt.so.1 (0x003de000)
libexpat.so.1 => /lib/libexpat.so.1 (0x00695000)
libdb-4.7.so => /lib/libdb-4.7.so (0x0040e000)
libapr-1.so.0 => /usr/lib/libapr-1.so.0 (0x00110000)
libpthread.so.0 => /lib/libpthread.so.0 (0x00257000)
libc.so.6 => /lib/libc.so.6 (0x00e37000)
/lib/ld-linux.so.2 (0x00aae000)
libdl.so.2 => /lib/libdl.so.2 (0x0096d000)
libuuid.so.1 => /lib/libuuid.so.1 (0x007c8000)
libfreebl3.so => /lib/libfreebl3.so (0x00d94000)

为什么 libuuidlibfreebl3 列在 CentOS 框上,但没有列在 Ubuntu 上盒子?

我知道 httpd ELF 没有将它们列为依赖项:

0x00000001 (NEEDED)                     Shared library: [libm.so.6]
0x00000001 (NEEDED) Shared library: [libpcre.so.0]
0x00000001 (NEEDED) Shared library: [libselinux.so.1]
0x00000001 (NEEDED) Shared library: [libaprutil-1.so.0]
0x00000001 (NEEDED) Shared library: [libcrypt.so.1]
0x00000001 (NEEDED) Shared library: [libexpat.so.1]
0x00000001 (NEEDED) Shared library: [libdb-4.7.so]
0x00000001 (NEEDED) Shared library: [libapr-1.so.0]
0x00000001 (NEEDED) Shared library: [libpthread.so.0]
0x00000001 (NEEDED) Shared library: [libc.so.6]

有什么见解吗?

编辑:在两个测试中使用的 httpd 二进制文件是同一个(我从 CentOS RPM 解压缩)。

最佳答案

Apache 可能是在 Fedora 和 Ubuntu 上使用不同的选项构建(编译)的。

也许比较的输出

httpd -V

会告诉你更多相关信息。

关于ubuntu - ldd 不同的输出。相同的二进制文件不同的发行版,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12714219/

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