PostgreSQL 9.1 on Ubuntu 12.04 LTS - pg_ctl: server failed to start

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 
+4
source share
1 answer

Of all the tutorials on the Internet, this is the one that finally worked for me.

http://codingforme.wordpress.com/2012/05/15/installing-postgresql-database-and-pgadmin-iii-in-ubuntu-12-04/

I made "pg_dropcluster 9.1 main" and then "pg_createcluster 9.1 main start" and then followed EXACTLY.

The main difference is that in other tutorials it is not possible to create a user in postgresql, instead only a user is created in unix. Perhaps this is due to differences in version. Again, I am using postgresql 9.1.5 and am on ubuntu 12.04.

ALSO ... Don't forget apt-get install libpq-dev

Hope this helps someone else in my situation.

+6
source

All Articles