1

I've been trying without success to install the Nginx version of Phusion Passenger (mod_rails) on my server by using the command gem install passenger followed by passenger-install-nginx-module. Everything goes smoothly, until I get the below error at the end:

# sh ./configure --prefix='/opt/nginx' --with-http_ssl_module 
--with-pcre='/tmp/root-passenger-15796/pcre-8.10' 
--add-module='/usr/lib/ruby/gems/1.8/gems/passenger-3.0.6/ext/nginx'
checking for OS
 + Linux 2.6.18-028stab070.14 x86_64
checking for C compiler ... found but is not working

./configure: error: C compiler gcc is not found

I'm not really sure what the problem could be. Any suggestions would be greatly appreciated. Thanks in advance!


Edits from Incognito (rather than adding a million comments):

I'm following the guides here so that I can run redmine on nginx using postgresql. This is rigged by a shell script from passenger-install-nginx-module which runs

sh ./configure --prefix='/opt/nginx' --with-http_ssl_module --with-cc-opt='-Wno-error' --add-module='/usr/lib/ruby/gems/1.8/gems/passenger-3.0.9/ext/nginx'

Right after attempting to install nginx with passenger...

Here's the relevant lines of code that throw this error: http://pastebin.com/GwrJcEkf

Here's a copy of the config.log that was spit out: http://pastebin.com/qkepYZ6X

I end up with the exact same issue on Ubuntu11, and Debian 6.

3
  • It may be worth mentioning, I'm following this library.linode.com/web-applications/project-management/redmine/… so that I can run redmine on nginx using postgresql. This is trigged by a shell script from /passenger-install-nginx-module which runs sh ./configure --prefix='/opt/nginx' --with-http_ssl_module --with-cc-opt='-Wno-error' --add-module='/usr/lib/ruby/gems/1.8/gems/passenger-3.0.9/ext/nginx' right after attempting to install nginx with passenger.
    – Incognito
    Sep 22, 2011 at 2:28
  • Here's the relevant lines of code that throw this error: pastebin.com/GwrJcEkf
    – Incognito
    Sep 22, 2011 at 13:50
  • Here's a copy of the config.log that was spit out: pastebin.com/qkepYZ6X
    – Incognito
    Sep 22, 2011 at 14:23

3 Answers 3

1

./configure: error: C compiler gcc is not found

You don't have gcc installed and you're trying to compile something with gcc.

sudo apt-get install gcc

8
  • I tried that. Gcc is already installed, it's just not working.
    – Luke Crowe
    Apr 13, 2011 at 22:47
  • Can I see an output of gcc -v and uname -a then? It sounds like automake can't find a working gcc compiler then... Have you ever compiled anything on this machine before? Apr 13, 2011 at 22:57
  • No, I haven't; I just got it. The output of gcc -v was a bunch of different "configured with" parameters, followed by gcc version 4.4.3 (Ubuntu 4.4.3-4ubuntu5). The output of uname -a was Linux syyborg.com 2.6.18-028stab070.14 #1 SMP Thu Nov 18 16:04:02 MSK 2010 x86_64 GNU/Linux.
    – Luke Crowe
    Apr 13, 2011 at 23:09
  • So, the following command that gets called in the configure script for nginx checks to see if you have a valid gcc compiler gcc -v 2>&1 | grep 'gcc version' 2>&1 | sed -e 's/^.* version \(.*\)/\1/' immediately after that the line where you see checking for C compiler ... found but is not working is printed, can you see what running the above command in your terminal does? Apr 13, 2011 at 23:34
  • better yet, compile a simple c program and see what you get--echo 'int main(int argc, char** argv){return 1;}' > t.c; gcc -o t t.c; ./t Apr 13, 2011 at 23:42
1

apt-get install build-essential (sudo'ed if necessary) sorted out a similar issue for me in Debian.

1

According to the Hongli Lai who is author of Phusion Passenger, check to see if you have /tmp is mounted with noexec option. If not, I suggest you manual compiling from source, it would works.

1
  • Already attempted that and it was supposed to be fixed since then anyway.
    – Incognito
    Sep 28, 2011 at 2:34

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .