cannot restore segment prot after reloc: Permissio

在启动php-cgi时报如下的错误

Starting php_fpm /usr/local/nginx/fastcgi/bin/php-cgi: error while loading shared libraries: /usr/local/mysql/lib/libmysqlclient.so.15: cannot restore segment prot after reloc: Permission denied

通过一番搜索后,得到如下解决办法:

[root@localhost ~]# more /etc/sysconfig/selinux

# This file controls the state of SELinux on the system.

# SELINUX= can take one of these three values:

# enforcing – SELinux security policy is enforced.

# permissive – SELinux prints warnings instead of enforcing.

# disabled – SELinux is fully disabled.

SELINUX=enforcing

# SELINUXTYPE= type of policy in use. Possible values are:

# targeted – Only targeted network daemons are protected.

# strict – Full SELinux protection.

SELINUXTYPE=targeted

看来是selinux的缘故,关掉selinux试试!

修改SELINUX=disabled,然后重启系统才能生效,或者执行:setenforce 0,立即生效。

果然,关闭selinux后,可以正常启动了。

其实在上面出现Permission denied时,也可以执行

#chcon -t texrel_shlib_t?/usr/local/mysql/lib/libmysqlclient.so.15

cannot restore segment prot after reloc: Permissio

相关文章:

你感兴趣的文章:

标签云: