0

After I install and when restarting Postgresql I get this error. I have tried changing permissions accordingly(the owner of the all the directories and files in the error message is postgres) but to no avail. I have also completely purged and reinstalled different version of postgresql and get the same error on every install. I have tried starting as root and as postgres user.

"/var/log/postgresql/postgresql-9.2-main.log" is empty.

root@ks27059:/var/lib/postgresql/9.2# /etc/init.d/postgresql start

* Starting PostgreSQL 9.2 database server                                      * Error:      
could not exec /usr/lib/postgresql/9.2/bin/pg_ctl /usr/lib/postgresql/9.2/bin/pg_ctl start  
-D /var/lib/postgresql/9.2/main -l /var/log/postgresql/postgresql-9.2-main.log -s -o  -c 
config_file="/etc/postgresql/9.2/main/postgresql.conf" :
3
  • "the owner of the all the directories and files in the error message is postgres" Just glancing at my own install (9.1 on Ubuntu 12.04), root owns /usr/lib/postgresql and everything downstream of it. Commented Oct 16, 2012 at 1:56
  • Possible duplicate of stackoverflow.com/questions/2748607/… or stackoverflow.com/questions/11874754/… ; please read those questions
    – Craig Ringer
    Commented Oct 16, 2012 at 2:15
  • I had already tried both solutions mentioned in the questions linked by Ringer. I installed postgresql 9.2 from "add-apt-repository ppa:pitti/postgresql" using "aptitude install postgresql-9.2" and before that installation I had tried every possible way I found in google. My mistake for posting this in the wrong forum. I'm defeated and this question can be deleted.
    – cancerballs
    Commented Oct 16, 2012 at 7:43

1 Answer 1

2

Although this is posted in the wrong forum I found an answer and I'd like to present it here for other people to see.

I had a Zend installation on my server which caused the error. I removed Zend and typed

"rm -r /usr/local/zend"

after which postgresql installed smoothly. I can't recommend this solution if you need your Zend but for me it worked.

1
  • Thanks for following up. I presume that the Zend install had a bundled copy of PostgreSQL? Or it had added entries to LD_LIBRARY_PATH or /etc/ld.so.conf that conflicted with system libraries? Otherwise I struggle to understand how it would've affected your PostgreSQL install.
    – Craig Ringer
    Commented Oct 17, 2012 at 5:22

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .