Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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

1 Answer 1

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

 
discard

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.