Linux – Issue with starting apache on CentOS 6.3

apache-2.2centos6librarylinux

I have some box that was handed to me and I can't even start the basic apache server. It's installed via yum (I've uninstalled and installed it) and when I start the service (service httpd start) its says "OK", but there's no pid. Status shows not running.

In the error_log there is the following:

[Wed Feb 13 16:16:36 2013] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Wed Feb 13 16:16:36 2013] [notice] Digest: generating secret for digest authentication ...
[Wed Feb 13 16:16:36 2013] [notice] Digest: done
/usr/sbin/httpd: symbol lookup error: /usr/lib64/libaprutil-1.so.0: undefined symbol: apr_os_uuid_get

I assume it's not starting because of the last line. Suggestions?

ldd $(which httpd)
    linux-vdso.so.1 =>  (0x00007fff9edff000)
    libm.so.6 => /lib64/libm.so.6 (0x00007f4c8815c000)
    libpcre.so.0 => /lib64/libpcre.so.0 (0x00007f4c87f30000)
    libselinux.so.1 => /lib64/libselinux.so.1 (0x00007f4c87d10000)
    libaprutil-1.so.0 => /usr/lib64/libaprutil-1.so.0 (0x00007f4c87aec000)
    libcrypt.so.1 => /lib64/libcrypt.so.1 (0x00007f4c878b5000)
    libexpat.so.1 => /lib64/libexpat.so.1 (0x00007f4c8768c000)
    libdb-4.7.so => /lib64/libdb-4.7.so (0x00007f4c87318000)
    libapr-1.so.0 => /usr/lib64/libapr-1.so.0 (0x00007f4c870e9000)
    libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f4c86ecb000)
    libc.so.6 => /lib64/libc.so.6 (0x00007f4c86b38000)
    libdl.so.2 => /lib64/libdl.so.2 (0x00007f4c86934000)
    /lib64/ld-linux-x86-64.so.2 (0x000000369be00000)
    libuuid.so.1 => /lib64/libuuid.so.1 (0x00007f4c8672f000)
    libfreebl3.so => /lib64/libfreebl3.so (0x00007f4c864cd000)
    librt.so.1 => /lib64/librt.so.1 (0x00007f4c862c5000)

Best Answer

After taking a look at the ldd information, it looks like your httpd binary is compiled against different libraries than are currently installed. I would purge as many of the apache dependencies as is safe to do so and reinstall them. Before you do that, though, I would also check to see if you have any non-standard yum repositories installed. Certain of the third-party yum repositories are famous for causing some terrible conflicts that look somewhat similar to this.

For starters:

yum remove apr-devel apr-util-devel httpd

Unfortunately, even if this does solve the problem, you may already be neck deep in system incompatibility. It looks like whoever administered this system before you either compiled things from source, installed RPMs that were incompatible, or misused third-party repos. You may spend less time reinstalling the system than trying to clean it up.

Related Topic