Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

Ubuntu 14.04. Package manager reported that postgresql was broken. When I tried to upgrade it produced the following error:

(synaptic:30668): GLib-CRITICAL **: g_child_watch_add_full: assertion 'pid > 0' failed
(Reading database ... 377899 files and directories currently installed.)
 Preparing to unpack .../postgresql-9.3_9.3.5-0ubuntu0.14.04.1_amd64.deb ...
 * Stopping PostgreSQL 9.3 database server                                       *            Use of uninitialized value $info{"pgdata"} in -d at /usr/bin/pg_ctlcluster line 354.
 Use of uninitialized value $info{"pgdata"} in concatenation (.) or string at   /usr/bin/pg_ctlcluster line 355.
 Error:  is not accessible or does not exist
                                                                     [fail]
invoke-rc.d: initscript postgresql, action "stop" failed.
dpkg: warning: subprocess old pre-removal script returned error exit status 1
dpkg: trying script from the new package instead ...
* Stopping PostgreSQL 9.3 database server                                       * Use  of uninitialized value $info{"pgdata"} in -d at /usr/bin/pg_ctlcluster line 354.
Use of uninitialized value $info{"pgdata"} in concatenation (.) or string at  /usr/bin/pg_ctlcluster line 355.
Error:  is not accessible or does not exist
                                                                     [fail]
invoke-rc.d: initscript postgresql, action "stop" failed.
dpkg: error processing archive /var/cache/apt/archives/postgresql-9.3_9.3.5- 0ubuntu0.14.04.1_amd64.deb (--unpack):
 subprocess new pre-removal script returned error exit status 1
 Errors were encountered while processing:
 /var/cache/apt/archives/postgresql-9.3_9.3.5-0ubuntu0.14.04.1_amd64.deb
 E: Sub-process /usr/bin/dpkg returned an error code (1)
 A package failed to install.  Trying to recover:
 Setting up postgresql-9.3-postgis-2.1 (2.1.2+dfsg-2) ...
 dpkg: dependency problems prevent configuration of postgresql-contrib-9.3:
 postgresql-contrib-9.3 depends on postgresql-9.3 (= 9.3.5-0ubuntu0.14.04.1); however:
 Version of postgresql-9.3 on system is 9.3.4-1.

 dpkg: error processing package postgresql-contrib-9.3 (--configure):
 dependency problems - leaving unconfigured 
 Errors were encountered while processing:
 postgresql-contrib-9.3

PGDATA variable is assigned in /etc/profile.d and is present in all shells.

share|improve this question
    
Try again, you might have caught the postgresql packages in mid change. –  ubfan1 Aug 16 at 2:59
    
Tried, same error. –  petyanca Aug 16 at 8:02
    
You're running postgresql 9.3.4-1 and should update to 9.3.5-0, so where did the 9.3_9.3.5-0 package(s) come from? –  ubfan1 Aug 16 at 19:05
    
It probably got downloaded when Package Manager upgraded postgresql-contrib-9.3. When I run 'sudo apt-get upgrade' I get Reading package lists... Done Building dependency tree Reading state information... Done You might want to run 'apt-get -f install' to correct these. The following packages have unmet dependencies: postgresql-contrib-9.3 : Depends: postgresql-9.3 (= 9.3.5-0ubuntu0.14.04.1) but 9.3.4-1 is installed E: Unmet dependencies. Try using -f. –  petyanca Aug 17 at 1:48
    
Did you try the suggestion, sudo apt-get -f install ? –  ubfan1 Aug 17 at 16:12

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.