Take the 2-minute tour ×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.

When running the ldd utility to find the shared libs for httpd, I found the following scenario that I just can't explain:


On my Ubuntu box:

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)

And on a CentOS box:

[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)

Why the libuuid and the libfreebl3 are listed on the CentOS box but are not listed on the Ubuntu box?

I know that the httpd ELF doesn't list them as a dependency:

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]

Any insights?

EDIT: The httpd binary used on both tests was the same one (That I unpacked from the CentOS RPM).

share|improve this question

2 Answers 2

Propably Apache was built (compiled) with different options on Fedora and Ubuntu.

Maybe comparing the output of

httpd -V

will tell you more about that.

share|improve this answer

libapr-1 is called libapr-1.0 in ubuntu. At least, it is in 12.04 anyway.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.
{"cc_re__cc_re__cc_by_sa_3_0": ["sites in the Stack Exchange network\">Area 51</a></li>\r\n                        <li><a href=\"//careers.stackoverflow.com?utm_source=stackoverflow.com&amp;utm_medium=site-ui&amp;utm_campaign=footerlink\">Stack Overflow Careers</a></li>\r\n                    \r\n                </ol>\r\n            </td>\r\n    </tr>\r\n</table>\r\n                </div>\r\n            </div>\r\n\r\n            <div id=\"copyright\">\r\n                site design / logo &#169; 2014 stack exchange inc; user contributions licensed under <a href=\"http://creativecommons.org/licenses/by-sa/3.0/\" rel=\"license\">cc by-sa 3.0</a>                   with <a href=\"http://blog.stackoverflow.com/2009/06/attribution-required/\" rel=\"license\">attribution required</a>\r\n            </div>\r\n            <div id=\"svnrev\">\r\n                rev 2014.12.27.2141\r\n            </div>\r\n            \r\n        </div>\r\n    </div>\r\n    <noscript>\r\n        <div id=\"noscript-warning\">Stack Overflow works best with JavaScript enabled<img src=\"http://pixel.quantserve.com/pixel/p-c1rF4kxgLUzNc.gif\" alt=\"\" class=\"dno\"></div>\r\n    </no"], "copyright__copyright__copyright": ["uestion\n\n2 Answers 2\n\nPropably Apache was built (compiled) with different options on Fedora and Ubuntu.\n\nMaybe comparing the output of\n\nhttpd -V\n\nwill tell you more about that.\n\nshare|improve this answer\n\nlibapr-1 is called libapr-1.0 in ubuntu. At least, it is in 12.04 anyway.\n\nshare|improve this answer\n\nYour Answer\n\n\u00a0\ndiscard\n\nBy posting your answer, you agree to the privacy policy and terms of service.\n\nNot the answer you're looking for? Browse other questions tagged or ask your own question."]}