I'm trying to install Passenger and Nginx on my VPS.
I followed these instructions and replaced all links of all sources to the current version.
But when i ran the Phusion Passenger installer for Nginx, something with gcc compiler went wrong:
Compiling and installing Nginx...
# sh ./configure --prefix='/opt/nginx' --with-http_ssl_module --with-http_gzip_static_module --with-cc-opt='-Wno-error' --add-module='/usr/local/lib/ruby/gems/1.9.1/gems/passenger-3.0.17/ext/nginx'
checking for OS
+ Linux 2.6.32-220.el6.x86_64 x86_64
checking for C compiler ... not found
./configure: error: C compiler gcc is not found
What should I do?
OBS: My VPS works with CentOS 6.2 x64
One quick hack (I struggled a lot with it and finally install pre-built) is to install the pre-built package of Nginx rather than compiling it from source.
For RHEL/CentOS create the file named /etc/yum.repos.d/nginx.repo with the following contents:
In above
baseurl
replace “OS” with “centos” and “OSRELEASE” with “6”.Finally execute
yum install nginx
Reference https://nginx.org/en/linux_packages.html#stable
If you do have gcc installed, the problem stems from /tmp being mounted as noexec. The error doesn't exactly help, but if you remount /tmp as exec you can install passenger properly.
same problem here and I found out that I am not able to run command as root has to use
and it worked like charm
Be sure that you sudo, if applicable.
Example:
Have the same problem and the following commands solve it; (on ubuntu server)
Got the same error. Just installed gcc and it started working: