This is a bug in V1.06-V1.07 of Postgres and is fixed in V1.08 and above.
This indicates that you have not compiled shared memory support into your kernel. You need to recompile the Linux kernel to add this feature.
Failed Assertion("!(file != 0):(null)", File: "/usr/local/PostgreSQL/src/backend/storage/file/fd.c", Line: 257) !(file != 0) (0) initdb: could not create template database initdb: cleaning up.
Your permissions on the file /dev/null are wrong.
ls -l /dev/null should give you something like:
crw-rw-rw- 1 root wheel 2, 2 Oct 8 18:41 /dev/null
Correct the permissions using:
chmod a+rw /dev/null
There is a problem with Version 2.5.3 of GNU flex and createuser. Your options are to downgrade flex to V2.5.2, apply a patch to V2.5.3 (supplied in doc/README.flex) or wait for V2.5.4 which will fix the bug.
permission=384IpcMemoryCreate: shmget(..., create, ...) failed: Invalid argument
You haven't build IPC support into your Linux kernel. You will have to rebuild the kernel and switch on this option.
Psql has been compiled to link dynamically with the libpq library.
To solve this, you should log in as root and edit the file /etc/ld.so.conf Add a single line at the end which gives the name of the PostgreSQL library directory (the lib subdirectory of your PostgreSQL installation) and run /sbin/ldconfig