Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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.

share|improve this question
    
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 '11 at 2:28
    
Here's the relevant lines of code that throw this error: pastebin.com/GwrJcEkf –  Incognito Sep 22 '11 at 13:50
    
Here's a copy of the config.log that was spit out: pastebin.com/qkepYZ6X –  Incognito Sep 22 '11 at 14:23
add comment

3 Answers

./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

share|improve this answer
    
I tried that. Gcc is already installed, it's just not working. –  Luke Crowe Apr 13 '11 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? –  photoionized Apr 13 '11 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 '11 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? –  photoionized Apr 13 '11 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 –  photoionized Apr 13 '11 at 23:42
show 3 more comments

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

share|improve this answer
add comment

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.

share|improve this answer
    
Already attempted that and it was supposed to be fixed since then anyway. –  Incognito Sep 28 '11 at 2:34
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.