升级 postgres 时出错

升级 postgres 时出错

Ubuntu 14.04。包管理器报告 postgresql 已损坏。当我尝试升级时,它产生了以下错误:

(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

PGD​​ATA 变量在 /etc/profile.d 中分配并存在于所有 shell 中。

相关内容