Server Fault is a question and answer site for system and network administrators. 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 just built/installed Postgresql on my Ubuntu machine, and I am having trouble getting it to actually run, I keep getting the error.

I set up the server to run and output a logfile (exactly as in the documentation), it appears to work fine (running as 'su - postgres' who owns the pgsql directory):

postgres@ubuntu:~$ /usr/local/pgsql/bin/postmaster -D /usr/local/pgsql/data >logfile 2>&1 &
[1] 2200

But then, I try to create a db, and I get this error:

postgres@ubuntu:~$ usr/local/pgsql/bin/createdb test
-su: usr/local/pgsql/bin/createdb: No such file or directory
[1]+  Exit 2                  /usr/local/pgsql/bin/postmaster -D /usr/local/pgsql/data > logfile 2>&1

Any ideas of what I am missing? I have done this before - I am just confused right now...

share|improve this question
up vote 2 down vote accepted

Uhm... you're missing a / at the start.

The bash prompt says you're $home, and you're running createdb without beginning with /, so it's looking for $home/usr/local/pgsql/bin/createdb

share|improve this answer

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.