3

All,

I'm trying to install/run PostgreSQL 9.3, but am receiving a multitude of errors which seem to point to a failed installation of postgresql from the enterpriseDB package.

For example, trying to start the server with this command:

sudo /etc/init.d/postgresql-9.3 restart (or start)

...yields the following:

Restarting PostgreSQL 9.3: 
-su: /opt/PostgreSQL/9.3/bin/pg_ctl: No such file or directory
PostgreSQL 9.3 did not start in a timely fashion, please see /opt/PostgreSQL/9.3/data/pg_log/startup.log for details

Except there is no /opt/PostgreSQL/ folder, and I've been told that creation of that was attempted during the EnterpriseDB installation...why the start command is trying to go there, I do not know!

I've started another thread which gave me a very temporary solution, but that doesn't seem to help after I do a restart of my machine.

So the question, how do I completely remove the EnterpriseDB failed installation?

I've tried these commands, but the issue still lingers:

sudo apt-get autoremove postgresql-9.3-postgis pgadmin3
sudo apt-get --purge remove postgresql\*

Any thoughts or recommendations are welcome!

Thank you!

-m

Inactivated Account
  • 303
  • 2
  • 3
  • 12

2 Answers2

2

I accidentally deleted my passwd file under /etc directory and after that postgresql service could start, when I run command systemctl status postgresql.myversion. the error was

no passwd entry found for user postgres

I decided to reinstall postgresql. Because I used enterpricedb installer

sudo apt-get --purge remove postgresql* did not work for me.

In my case uninstaller was under /opt/PostgreSQL/9.5/. cd here and

sudo ./uninstall-postgresql then reinstall using enterpricedb, installer recreated postgres user and problem solved

may help someone else

Ismail Sahin
  • 121
  • 3
2

In Feb 2009, Scahin_S wrote in [1] to use the uninstall-postgresql binary. In the same thread Sachin_S also documented a manual alternative for uninstalling 8.3 is

/opt/PostgreSQL/8.3/installer/server/removeshortcuts.sh /opt/PostgreSQL/8.3 8.3 
/etc/init.d postgresql-8.3 stop 
rm -rf /opt/PostgreSQL 
rm /etc/postgres-reg.ini 
rm -rf /etc/init.d/postgresql-8.3 
userdel postgres 

if /etc/ld.so.conf exists, edit it and remove /opt/PostgreSQL/8.3/lib 
if present. 

if /etc/ld.so.conf.d exists: 

rm /etc/ld.so.conf.d/postgresql-8.3.conf

1 - "Uninstall Postgres" thread Enterprise DB "PostgreSQL Installers for Windows, Linux and OS X" forum http://forums.enterprisedb.com/posts/list/1437.page

buzz3791
  • 396
  • 1
  • 2
  • 13