Linux – Cannot install postgres due to missing directory

linuxpostgresqlUbuntu

On Ubuntu Natty when trying to install postgres I get the following error
/var/lib/postgresql/8.4/main is not accessible or does not exist
How can I fix this?

Best Answer

Have you tried installing a previous revision of postgres? It could just be that something is wrong with the package. Are you trying to install postgres somewhere specific and not going about the installation automatically? If so it might be wanting to install from a source that isn't where it would be expecting it