postgres problem - I know its my fault but help

The place to post if you need help or advice

Moderators: ChrisThornett, LXF moderators

postgres problem - I know its my fault but help

Postby pk_fox » Sat Jun 07, 2014 6:18 am

Hi all, i've just installed Postgres 9.3 on a Debian box running Wheezy and I naively thought the installer would remove 9.1 which is installed as standard, well it didn't and I ended up with two servers running on 5432 and 5433 which I don't won't. Anyway to cut it short I read on the web somewhere how to completely uninstall Postgresql which entailed deleting directories etc... And you guessed it Postgresql is now totally hosed, I've tried apt-get remove --purge postgres which claims to have removed it , I then installed 9.3 using apt-get which again claims to have installed it but postgres won't start and there is no script in /etc/init.d to start it, trying to start it manually gives an error of no clusters created and is postgres running on port 5432 etc... I really don't want to have to reinstall Debian as I have it pretty well setup as Ilike it. All suggestions welcomed.
We can't stop here, this is bat country. Hunter S Thompson RIP.
User avatar
pk_fox
LXF regular
 
Posts: 298
Joined: Wed Apr 13, 2005 1:38 pm
Location: Surrey, UK

Postby wyliecoyoteuk » Sat Jun 07, 2014 9:47 am

Have you tried

dpkg --configure postgres

You might get better results using dpkg

http://www.tecmint.com/dpkg-command-examples/
The sig between the asterisks is so cool that only REALLY COOL people can even see it!

*************** ************
User avatar
wyliecoyoteuk
LXF regular
 
Posts: 3464
Joined: Sun Apr 10, 2005 10:41 pm
Location: Birmingham, UK

Postby pk_fox » Sat Jun 07, 2014 12:43 pm

quote="wyliecoyoteuk"]Have you tried

dpkg --configure postgres

You might get better results using dpkg

http://www.tecmint.com/dpkg-command-examples/[/quote]

Tried that and got this
Code: Select all
dpkg: error processing postgresql (--configure):
 package postgresql is already installed and configured
Errors were encountered while processing:
 postgresql
We can't stop here, this is bat country. Hunter S Thompson RIP.
User avatar
pk_fox
LXF regular
 
Posts: 298
Joined: Wed Apr 13, 2005 1:38 pm
Location: Surrey, UK

Postby wyliecoyoteuk » Sat Jun 07, 2014 2:49 pm

In thst case try using dpkg yo remove it and reinstall
The sig between the asterisks is so cool that only REALLY COOL people can even see it!

*************** ************
User avatar
wyliecoyoteuk
LXF regular
 
Posts: 3464
Joined: Sun Apr 10, 2005 10:41 pm
Location: Birmingham, UK

Postby wyliecoyoteuk » Sat Jun 07, 2014 3:53 pm

wyliecoyoteuk wrote:In that case try using dpkg to remove it and reinstall


(i hate phone autocorrect)
The sig between the asterisks is so cool that only REALLY COOL people can even see it!

*************** ************
User avatar
wyliecoyoteuk
LXF regular
 
Posts: 3464
Joined: Sun Apr 10, 2005 10:41 pm
Location: Birmingham, UK

Postby pk_fox » Sat Jun 07, 2014 5:25 pm

wyliecoyoteuk wrote:
wyliecoyoteuk wrote:In that case try using dpkg to remove it and reinstall


(i hate phone autocorrect)


Know what you mean - thanks I'll try it when I get home
We can't stop here, this is bat country. Hunter S Thompson RIP.
User avatar
pk_fox
LXF regular
 
Posts: 298
Joined: Wed Apr 13, 2005 1:38 pm
Location: Surrey, UK

Postby pk_fox » Sun Jun 08, 2014 9:52 am

wyliecoyoteuk wrote:
wyliecoyoteuk wrote:In that case try using dpkg to remove it and reinstall


(i hate phone autocorrect)


Hi there, I tried removing and reinstalling it using dpkg but still won't start and no postgresql script in /etc/init.d - surely there must be a way of forcing a complete reinstall which would recreate essential missing files and directories ? you know a repair botched by idiot user type thing !

EDIT

SUCCESS !!!

I ran this command and it worked

Code: Select all
apt-get --purge remove postgresql\*


I received a warning that some folders couldn't be removed as they weren't empty - I then removed what was in the listed directories and ran it again and BINGO - I installed postgresql again using
Code: Select all
apt-get autoremove -- just to be sure !
apt-get install postgresql

and it installed and started without a hitch - thanks very much for your help
We can't stop here, this is bat country. Hunter S Thompson RIP.
User avatar
pk_fox
LXF regular
 
Posts: 298
Joined: Wed Apr 13, 2005 1:38 pm
Location: Surrey, UK


Return to Help!

Who is online

Users browsing this forum: No registered users and 3 guests

cron