Unable to install passenger-install-apache2-module in 512MB - 20GB - nyc2 Droplet

April 13, 2014 3.9k views
Hi I have installed ruby 2.1.0 in my droplet, but when I am trying to install passenger-install-apache2-module, I am getting following exception. I have already swapped my memory twice, but I am getting same exception again and again. Please help me out In file included from ext/boost/bind/bind.hpp:29:0, from ext/boost/bind.hpp:22, from ext/boost/thread/detail/thread.hpp:29, from ext/boost/thread/thread_only.hpp:22, from ext/boost/thread/thread.hpp:12, from ext/boost/thread.hpp:13, from ext/common/agents/HelperAgent/Main.cpp:45: ext/boost/bind/arg.hpp: In constructor ‘boost::arg::arg(const T&)’: ext/boost/bind/arg.hpp:37:22: warning: typedef ‘T_must_be_placeholder’ locally defined but not used [-Wunused-local-typedefs] typedef char T_must_be_placeholder[ I == is_placeholder::value? 1: -1 ]; ^ c++: internal compiler error: Killed (program cc1plus) Please submit a full bug report, with preprocessed source if appropriate. See for instructions. rake aborted! ----------------------------------------------- Your compiler failed with the exit status 4. This probably means that it ran out of memory. To solve this problem, try increasing your swap space: https://www.digitalocean.com/community/articles/how-to-add-swap-on-ubuntu-12-04 Tasks: TOP => apache2 => buildout/agents/PassengerHelperAgent (See full trace by running task with --trace) -------------------------------------------- It looks like something went wrong Please read our Users guide for troubleshooting tips: /usr/local/lib/ruby/gems/2.1.0/gems/passenger-4.0.41/doc/Users guide Apache.html http://www.modrails.com/documentation/Users%20guide%20Apache.html If that doesn't help, please use our support facilities. We'll do our best to help you. http://www.phusionpassenger.com/support
1 Answer
Sometimes swap isn't enough. You can add more swap but it'll dramatically slow down your droplet.

Try resizing temporarily to 1GB and resizing back to 512MB after compiling passenger.

You can also try stopping programs that might be taking up a lot of memory such as Apache or MySQL.
Have another answer? Share your knowledge.