httpd will not start due to error with libm.so.6

Support for webhosts that use CentOS
Post Reply
cmodyssey
Posts: 13
Joined: 2008/09/02 20:14:19

httpd will not start due to error with libm.so.6

Post by cmodyssey » 2008/09/02 20:43:04

Hi,

I am trying to start http for the first time on a new server and am getting a library access problem.

This is the error I get when trying to start it:

[code]
Starting httpd: /usr/sbin/httpd: error while loading shared libraries: libm.so.6: cannot open shared object file: Permission denied
[FAILED][/code]

Here are some ls commands:
[code]
[root@richt02 usr]# ls -l /lib/libm.so.6
lrwxrwxrwx 1 root root 11 Aug 25 14:16 /lib/libm.so.6 -> libm-2.5.so
[root@richt02 usr]# ls -l /lib/libm-2.5.so
-rwxr-xr-x 1 root root 206380 May 24 04:11 /lib/libm-2.5.so
[/code]

I then got a bit closer to the problem by doing an ldd:

[code]
[root@richt02 usr]# ldd /usr/sbin/httpd
linux-gate.so.1 => (0x0093c000)
libm.so.6 => not found
libpcre.so.0 => not found
libselinux.so.1 => not found
libaprutil-1.so.0 => not found
libcrypt.so.1 => not found
libldap-2.3.so.0 => not found
liblber-2.3.so.0 => not found
libdb-4.3.so => not found
libexpat.so.0 => not found
libapr-1.so.0 => not found
libpthread.so.0 => not found
libdl.so.2 => not found
libc.so.6 => not found
[/code]

I have searched for all of these library files and have found them either in the /lib/ or the /usr/lib/ directory.

Please could anyone who might know, let me know why I am getting this permission problem and ldd not found problem when the libraries do exist and the permissions to seem to be correct.

Here is some version information:

[code]
[root@richt02 usr]# uname -a
Linux richt02 2.6.18-92.1.10.el5xen #1 SMP Tue Aug 5 08:46:32 EDT 2008 i686 athlon i386 GNU/Linux
[root@richt02 usr]# rpm -q httpd
httpd-2.2.3-11.el5_1.centos.3
[/code]


Thanks in advance.

Richard

gerald_clark
Posts: 10642
Joined: 2005/08/05 15:19:54
Location: Northern Illinois, USA

Re: httpd will not start due to error with libm.so.6

Post by gerald_clark » 2008/09/03 14:03:10

How did you install httpd?

cmodyssey
Posts: 13
Joined: 2008/09/02 20:14:19

Re: httpd will not start due to error with libm.so.6

Post by cmodyssey » 2008/09/03 16:47:35

Hi,

I had installed it using "yum install httpd"

I have just found out the reason I had this problem and it was because I had selinux set to enforcing.

I've just taken out of enforcing and it's able to start successfully now.

Thanks for your interest in my problem :)

Richard.

User avatar
AlanBartlett
Forum Moderator
Posts: 9324
Joined: 2007/10/22 11:30:09
Location: ~/Earth/UK/England/Suffolk
Contact:

Re: httpd will not start due to error with libm.so.6

Post by AlanBartlett » 2008/09/03 17:08:11

If you haven't seen it, there is a CentOS Wiki article on SELinux - http://wiki.centos.org/HowTos/SELinux - that may help you.

NedSlider
Forum Moderator
Posts: 2895
Joined: 2005/10/28 13:11:50
Location: UK

Re: httpd will not start due to error with libm.so.6

Post by NedSlider » 2008/09/03 17:29:27

[quote]
cmodyssey wrote:
Hi,

I had installed it using "yum install httpd"

I have just found out the reason I had this problem and it was because I had selinux set to enforcing.

I've just taken out of enforcing and it's able to start successfully now.

Thanks for your interest in my problem :)

Richard.[/quote]

What SELinux AVC errors do you see in your logs?

cmodyssey
Posts: 13
Joined: 2008/09/02 20:14:19

Re: httpd will not start due to error with libm.so.6

Post by cmodyssey » 2008/09/03 22:02:27

Hi,

Thanks for your replies :)

Alan, I'll give that article a proper read, I feel I should put the effort in to configure SELinux to allow the httpd do what it needs, instead of just having it turned off.

Ned, I have looked in my /var/log/messages file and strangely, there are no AVC entries in it.

Thanks again everyone :D

NedSlider
Forum Moderator
Posts: 2895
Joined: 2005/10/28 13:11:50
Location: UK

Re: httpd will not start due to error with libm.so.6

Post by NedSlider » 2008/09/03 23:10:23

[quote]
cmodyssey wrote:

Ned, I have looked in my /var/log/messages file and strangely, there are no AVC entries in it.

Thanks again everyone :D[/quote]

If the auditd is running then SELinux AVC messages get logged to /var/log/audit/audit.log

You can check if additional rules may be required by running:

[code]grep httpd /var/log/audit/audit.log | audit2allow[/code]

then paste any output back here for use to look at.

cmodyssey
Posts: 13
Joined: 2008/09/02 20:14:19

Re: httpd will not start due to error with libm.so.6

Post by cmodyssey » 2008/09/04 05:41:15

Hi Ned,

I've checked my process list and auditd is running. SElinux is currently set to "Permissive".

I don't get any text when trying "grep httpd /var/log/audit/audit.log | audit2allow"

I do get the following if I don't pipe into audit2allow, E.G "grep httpd /var/log/audit/audit.log":

[code]
type=USER_LOGIN msg=audit(1220490954.265:12599): user pid=17287 uid=0 auid=4294967295 subj=system_u:system_r:init_t:s0 msg='acct="httpd": exe="/usr/sbin/sshd" (hostname=?, addr=211.137.75.216, terminal=sshd res=failed)'
type=USER_LOGIN msg=audit(1220490956.365:12601): user pid=17287 uid=0 auid=4294967295 subj=system_u:system_r:init_t:s0 msg='acct="httpd": exe="/usr/sbin/sshd" (hostname=?, addr=211.137.75.216, terminal=sshd res=failed)'
[/code]

Is there something else I should try?

Thanks,

Richard.

NedSlider
Forum Moderator
Posts: 2895
Joined: 2005/10/28 13:11:50
Location: UK

Re: httpd will not start due to error with libm.so.6

Post by NedSlider » 2008/09/04 08:24:20

I don't see anything there to indicate SELinux is blocking httpd from running.

Post Reply

Return to “CentOS 5 - Webhosting Support”