I'm using FreeBSD 8.0 and I've setup a jail, pgsql, to act as a database server. After installing, I've tried to run initdb but get the following error:

$ /usr/local/pgsql/bin/initdb -D /usr/home/pgsql
cannot create /dev/null: Permission denied
fgets failure: No such file or directory
The program "postgres" is needed by initdb but was not found in the
same directory as "/usr/local/pgsql/bin/initdb".
Check your installation.

yet dev/null exists:

root # ls /dev

and postgres is in the same directory:

root # find / -name postgres -print

Any ideas?


so /dev/null exists, or you have devfs mounted? If you just made a symlink or something, that doesn't work.

  • I must have forgotten to remount after a restart.
    – gvkv
    Jul 10 '10 at 8:19

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.