1

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)

Then:

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.

Rich
  • 121
  • 6
  • I hope you have a _really_ good reason for using potentially unstable pre-release software. – Michael Hampton Mar 28 '13 at 04: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

1 Answers1

1

I also posted this question to the Phusion Passenger Google Group: https://groups.google.com/forum/?fromgroups=#!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: https://www.digitalocean.com/community/articles/how-to-add-swap-on-ubuntu-12-04 Re-running the nginx install command completed successfully.

Rich
  • 121
  • 6