Linux Format forums Forum Index Linux Format forums
Help, discussion, magazine feedback and more
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

postgres problem - I know its my fault but help

 
Post new topic   Reply to topic    Linux Format forums Forum Index -> Help!
View previous topic :: View next topic  
Author Message
pk_fox
LXF regular


Joined: Wed Apr 13, 2005 2:38 pm
Posts: 292
Location: Surrey, UK

PostPosted: Sat Jun 07, 2014 7:18 am    Post subject: postgres problem - I know its my fault but help Reply with quote

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.
Back to top
View user's profile Send private message
wyliecoyoteuk
LXF regular


Joined: Sun Apr 10, 2005 11:41 pm
Posts: 3452
Location: Birmingham, UK

PostPosted: Sat Jun 07, 2014 10:47 am    Post subject: Reply with quote

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!

*************** ************
Back to top
View user's profile Send private message
pk_fox
LXF regular


Joined: Wed Apr 13, 2005 2:38 pm
Posts: 292
Location: Surrey, UK

PostPosted: Sat Jun 07, 2014 1:43 pm    Post subject: Reply with quote

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:

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.
Back to top
View user's profile Send private message
wyliecoyoteuk
LXF regular


Joined: Sun Apr 10, 2005 11:41 pm
Posts: 3452
Location: Birmingham, UK

PostPosted: Sat Jun 07, 2014 3:49 pm    Post subject: Reply with quote

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!

*************** ************
Back to top
View user's profile Send private message
wyliecoyoteuk
LXF regular


Joined: Sun Apr 10, 2005 11:41 pm
Posts: 3452
Location: Birmingham, UK

PostPosted: Sat Jun 07, 2014 4:53 pm    Post subject: Reply with quote

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!

*************** ************
Back to top
View user's profile Send private message
pk_fox
LXF regular


Joined: Wed Apr 13, 2005 2:38 pm
Posts: 292
Location: Surrey, UK

PostPosted: Sat Jun 07, 2014 6:25 pm    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
pk_fox
LXF regular


Joined: Wed Apr 13, 2005 2:38 pm
Posts: 292
Location: Surrey, UK

PostPosted: Sun Jun 08, 2014 10:52 am    Post subject: Reply with quote

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:

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:

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.
Back to top
View user's profile Send private message
View previous topic :: View next topic  
Display posts from previous:   
Post new topic   Reply to topic    Linux Format forums Forum Index -> Help! All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Linux Format forums topic RSS feed 


Powered by phpBB © 2001, 2005 phpBB Group


Copyright 2011 Future Publishing, all rights reserved.


Web hosting by UKFast