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]
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
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With