Can't uninstall postgresql package due failing to start service?

Starkers

I simply don't understand what's going on.

sudo apt-get remove postgresql

results in:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package 'postgresql' is not installed, so not removed
0 upgraded, 0 newly installed, 0 to remove and 35 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up postgresql-9.1 (9.1.10-0ubuntu13.04) ...
 * Starting PostgreSQL 9.1 database server                                                                                                                                                            * The PostgreSQL server failed to start. Please check the log output:
2013-11-05 12:40:58 PST FATAL:  could not create lock file "/var/run/postgresql/.s.PGSQL.5432.lock": Permission denied
                                                                                                                                                                                              [fail]
invoke-rc.d: initscript postgresql, action "start" failed.
dpkg: error processing postgresql-9.1 (--configure):
 subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
 postgresql-9.1
E: Sub-process /usr/bin/dpkg returned an error code (1)

I mean, why is it trying to start the server. Right I'm a bit of a unix noob and a huge postgres noob so bear with me, but randomly starting the server while I'm trying to uninstall it seems so random. Just don't get it.

How can I completely and utterly uninstall postgresql?

Braiam

Your first installation was kept uncertain, this will nuke it:

sudo dpkg --purge postgresql-9.1

Now you can reinstall the package:

sudo apt-get -f install
sudo apt-get install postgresql-9.1

이 기사는 인터넷에서 수집됩니다. 재 인쇄 할 때 출처를 알려주십시오.

침해가 발생한 경우 연락 주시기 바랍니다[email protected] 삭제

에서 수정
0

몇 마디 만하겠습니다

0리뷰
로그인참여 후 검토

관련 기사

분류에서Dev

Can't install bitcoind in upgraded system due package conflicts

분류에서Dev

Can't install bitcoind in upgraded system due package conflicts

분류에서Dev

can't start mysql service anymore

분류에서Dev

Ubuntu Service samba is masked and can't start

분류에서Dev

Web Service Client - Construction Failing Due To Timeout (Proxy Issue)

분류에서Dev

Service did not start due to a logon failure

분류에서Dev

Can't uninstall Asus Smart Gesture

분류에서Dev

MySQL service doesn't start

분류에서Dev

Can't start Byobu?

분류에서Dev

TortoiseSVN can't connect to repository due to timeout

분류에서Dev

Zipkin failing to start

분류에서Dev

Broke off Office 365 install, can't uninstall or reinstall

분류에서Dev

Android: startService won't start target service

분류에서Dev

Uninstall postgresql on MacOs Lion Mountain

분류에서Dev

Snort Failing to start on Ubuntu 9.04

분류에서Dev

I can't run "bundle install" due to libv8

분류에서Dev

Can't upgrade juju from 1.25.3 to 1.25.4 due to missing tools

분류에서Dev

Custom angular service injection failing

분류에서Dev

apache2 can't stop and nginx can't start

분류에서Dev

I can't start a new project on Netbeans

분류에서Dev

Ruby app and Resque: can't start workers

분류에서Dev

can't start calligra on linux xfce

분류에서Dev

Can't start MySQL server (database corruption)

분류에서Dev

can't start lightdm without systemctl

분류에서Dev

dnf can't download package from URL

분류에서Dev

Confused why systemd service doesn't start at boot

분류에서Dev

12.04.4 server can't verify common SSL certificates, usual fixes failing

분류에서Dev

Copy-item failing without error, I'm sure it's something simple but I can't see it

분류에서Dev

Failing to start IBM Http server with root user

Related 관련 기사

뜨겁다태그

보관