package bacula-director-pgsql 7.0.5+dfsg-4ubuntu0.1 failed to install/upgrade: sub-processo script post-installation instalado retornou estado de saída de erro 1
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
bacula (Ubuntu) |
Triaged
|
Medium
|
Unassigned |
Bug Description
In a bacula + postgresql installation, it was not possible to create the bacula bank automatically.
ProblemType: Package
DistroRelease: Ubuntu 16.04
Package: bacula-
ProcVersionSign
Uname: Linux 4.4.0-98-generic i686
ApportVersion: 2.20.1-0ubuntu2.10
Architecture: i386
Date: Mon Oct 30 20:37:55 2017
ErrorMessage: sub-processo script post-installation instalado retornou estado de saída de erro 1
InstallationDate: Installed on 2013-07-03 (1580 days ago)
InstallationMedia: Ubuntu 9.10 "Karmic Koala" - Release i386 (20091028.5)
RelatedPackageV
dpkg 1.18.4ubuntu1.2
apt 1.2.20
SourcePackage: bacula
Title: package bacula-
UpgradeStatus: Upgraded to xenial on 2016-08-03 (453 days ago)
Changed in bacula (Ubuntu): | |
importance: | Undecided → Medium |
status: | New → Triaged |
Thanks for filing this bug in Ubuntu.
I was able to confirm the problem on a fresh xenial container by just running:
sudo apt install bacula- director- pgsql
That pulls in the postgresql 9.5 server.
What happens is that bacula tries to reach out to postgresql on the localhost (if you accepted all bacula defaults), but postgresql is being installed in the same transaction and isn't ready yet. There isn't even a postgres user at that time. So things fail.
A couple work arounds: director- pgsql director- pgsql --reinstall". This time it should finish.
a) first install postgresql-9.5, then bacula-
b) when bacula complains about the database, select abort, and then do "sudo apt install bacula-
I believe in your case you can just run "sudo apt install --reinstall bacula- director- pgsql". I would also suggest a "sudo apt install -f" to be sure there are no remaining errors.