Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am attempting to install nginx to run a Rails site (3.2.13) with Passenger (4.0.0.rc5) on Ruby 2.0.0-p0 via RVM. I have successfully installed the Passenger gem, but when running:

rvmsudo passenger-install-nginx-module

I get the following error in the 'Compiling Passenger support files...' step:

g++ -o agents/PassengerHelperAgent.o  -Iext -Iext/common  -Iext/libev -Iext/libeio -D_REENTRANT -I/usr/local/include -DHAS_TR1_UNORDERED_MAP -DHAVE_ACCEPT4 -DHAS_ALLOCA_H -DHAS_SFENCE -DHAS_LFENCE -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wpointer-arith -Wwrite-strings -Wno-long-long -Wno-missing-field-initializers -ggdb -feliminate-unused-debug-symbols -feliminate-unused-debug-types -DPASSENGER_DEBUG -DBOOST_DISABLE_ASSERTS -fcommon -fvisibility=hidden -DVISIBILITY_ATTRIBUTE_SUPPORTED -Wno-attributes -c ext/common/agents/HelperAgent/Main.cpp
g++: internal compiler error: Killed (program cc1plus)
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-4.7/README.Bugs> for instructions.
rake aborted!
Command failed with status (4): [g++ -o agents/PassengerHelperAgent.o  -Iex...]
/home/rich/.rvm/gems/ruby-2.0.0-p0@global/gems/passenger-4.0.0.rc5/build/cplusplus_support.rb:31:in `compile_cxx'
/home/rich/.rvm/gems/ruby-2.0.0-p0@global/gems/passenger-4.0.0.rc5/build/agents.rb:87:in `block in <top (required)>'
/home/rich/.rvm/gems/ruby-2.0.0-p0@global/bin/ruby_noexec_wrapper:14:in `eval'
/home/rich/.rvm/gems/ruby-2.0.0-p0@global/bin/ruby_noexec_wrapper:14:in `<main>'
Tasks: TOP => nginx => nginx_without_native_support => agents/PassengerHelperAgent

I'm using the default options, so chose:

1. Yes: download, compile and install Nginx for me. (recommended)


Please specify a prefix directory [/opt/nginx]:

So the default location. If you need any more info, let me know. Is it a bug, my setup or some fault with my VPS? All I want is to be able to finish this step to begin using the server. Thanks.

share|improve this question

closed as too localized by Michael Hampton, mdpc, Dennis Kaarsemaker, pauska, Wesley Apr 1 '13 at 1:09

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

I hope you have a really good reason for using potentially unstable pre-release software. – Michael Hampton Mar 28 '13 at 4:05
Ruby 2.0.0 is the current stable version. At the time of the original post, Passenger required the 4.0.0 pre-release version to work with it. – Rich Mar 28 '13 at 12:00
up vote 1 down vote accepted

I also posted this question to the Phusion Passenger Google Group:!topic/phusion-passenger/V-t5xsHJ4Sw

The suggested reason for the installation failure was:

Your server probably does not have enough memory to run the compiler. Try increasing your swap space.

I then followed this guide to add the swapfile on my server: Re-running the nginx install command completed successfully.

share|improve this answer

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