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?


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.

  • /usr/bin/env: passenger-install-nginx-module: No such file or directory – RAJ ... Feb 5 '15 at 9:51
  • not using rvm using rbenv please update answer for rbenv users also. – vidur punj Dec 25 '20 at 7:13

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

wget ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p194.tar.gz
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 .

Source: http://excid3.com/blog/setting-up-ubuntu-12-04-with-ruby-1-9-3-nginx-passenger-and-postgresql-or-mysql/

  • E: Unable to locate package passenger-install-nginx-module – Alex Malex Jul 29 '12 at 7:59
  • @AlexMaslakov answer edited – rɑːdʒɑ 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 . – rɑːdʒɑ Jul 29 '12 at 8:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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