Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

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'm trying to install phusion passenger.


Eventually I got an error

Permission problems

This installer must be able to write to the following directory:


But it can't do that, because you're running the installer as alex.
Please re-run this installer as root.

I tried to do to

sudo passenger-install-nginx-module

but it says

sudo: passenger-install-nginx-module: command not found

How do I solve it?

share|improve this question
up vote 9 down vote accepted

From Passenger installation with nginx fails in Stack Overflow:

The correct way of running the Phusion Passenger installer for nginx, when using RVM, is to use rvmsudo as in:

rvmsudo passenger-install-nginx-module

Credits go to this blog post.

share|improve this answer
/usr/bin/env: passenger-install-nginx-module: No such file or directory – RAJ ... Feb 5 '15 at 9:51

open your terminal and type this to create a user as deploy .

sudo adduser deploy

then do Update and install required dependencies with this command

sudo apt-get -y update
sudo apt-get -y install build-essential zlib1g-dev libssl-dev libreadline-dev libyaml-dev libcurl4-openssl-dev curl git-core python-software-properties

then we have to install Ruby

tar -xvzf ruby-1.9.3-p194.tar.gz
cd ruby-1.9.3-p194/
sudo make install
echo "gem: --no-ri --no-rdoc" >> ~/.gemrc
sudo gem install bundler

Then now we are able to install Nginx with Passenger , with these commands

sudo gem install passenger
sudo passenger-install-nginx-module

Hope that helps .


share|improve this answer
E: Unable to locate package passenger-install-nginx-module – Alex Malex Jul 29 '12 at 7:59
@AlexMaslakov answer edited – Raja Jul 29 '12 at 8:07
I don't need to install ruby, curl, etc. I already have them! I just need to install passenger as root. – Alex Malex Jul 29 '12 at 8:11
I used rvmsudo instead. It works. – Alex Malex Jul 29 '12 at 8:17
you can edit my Answer to improve the answer . Glad u got it . – Raja Jul 29 '12 at 8:20

Your Answer


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.