Centos 6.4 - Failed to map segment from shared object: Permission denied

蹲街弑〆低调 提交于 2020-01-01 08:32:55

问题


Hi, I am trying to install Phusion Passenger. Installation was successful but I am getting the following error on doing service httpd start

Starting httpd: httpd: Syntax error on line 221 of /etc/httpd/conf/httpd.conf: Syntax error on line 1 of /etc/httpd/conf.d/passenger.conf: Cannot load /usr/local/rvm/gems/ruby-2.0.0-p353/gems/passenger-4.0.33/buildout/apache2/mod_passenger.so into server: /usr/local/rvm/gems/ruby-2.0.0-p353/gems/passenger-4.0.33/buildout/apache2/mod_passenger.so: failed to map segment from shared object: Permission denied [FAILED]


回答1:


You may refer the following link for Phusion Passenger installation guide. http://www.modrails.com/documentation/Users%20guide%20Apache.html#installation

Or else execute this command in root to change the security context of “httpd_sys_script_exec_t” which allows Apache to execute.

chcon -R -h -t httpd_sys_script_exec_t /usr/local/rvm/gems/ruby-2.0.0-p353/gems/passenger-4.0.33/buildout/apache2/mod_passenger.so




回答2:


This might be irrelevant to this version of centOS. But just putting this out.

This issue might come due to selinux policy.

$ uname -a Linux enc02 3.10.0-327.el7.x86_64 #1 SMP Thu Nov 19 22:10:57 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux

$ cat /etc/centos-release CentOS Linux release 7.5.1804 (Core)

Try with the following command for disabling selinux sudo setenforce 0

Try running your application and test.

To get it back sudo setenforce 1

If this works then you can try and configure some policys for your application/user.

Source: failed to map segment from shared object



来源:https://stackoverflow.com/questions/20919771/centos-6-4-failed-to-map-segment-from-shared-object-permission-denied

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!