Update 2 - I uninstalled and reinstalled packages from inside the root (e.g. su), instead of suing my own account. This allowed to run executable files from / tmp, which got rid of the error from the first update.
Update - just tried uninstalling and reinstalling (apt-get remove --purge postgresql, then apt-get install postgresql postgresql-contrib postgresql-client) and received this error, which I suspect is due to my problems: *
Can't exec "/tmp/postgresql-common.config.32601": Permission denied at /usr/share/perl/5.14/IPC/Open3.pm line 186. open2: exec of /tmp/postgresql-common.config.32601 configure failed at /usr/share/perl5/Debconf/ConfModule.pm line 59
I'm having trouble sending postgreSQL and I hope to get help.
I already studied the answers and comments from the following posts - and tried pg_dropcluster and pg_createcluster - but did not manage to configure postgreSQL 9.1 to run on Ubuntu 12.04. (However, I was unable to install and configure postgreSQL on windows without problems.)
Failed to start Postgresql
- I should note that the answer given here seems useful, but since I am new to Linux, I could not follow it. I also wonder if there is an easier way. The OP also did not accept the answer, so I'm not sure if this really solves the problem.
Postgresql changing data directory in ubuntu
I suspect that the OP had the exact same problem as mine, since I get the same error messages and also there is no log file output, despite the error message in the terminal.
pg_ctl: could not start server Examine the log output. PostgreSQL 9.1 did not start in a timely fashion, please see opt/PostgreSQL/9.1/data/pg_log/startup.log for details