package zoneminder 1.26.5-1ubuntu3 failed to install: subprocess installed post-installation script returned error exit status 255

Bug #1392983 reported by Jerre Domitilli
38
This bug affects 7 people
Affects Status Importance Assigned to Milestone
zoneminder (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

installed with ubuntu software center, tried visiting 127.0.0.1/zm and got 404. Attempted to start the service manually and got and error saying zoneminder failed to start with no further information and no entries in apache's error log.
removed with sudo apt-get remove zoneminder && sudo apt-get autoremove
reinstalled with sudo apt-get install zoneminder which brought me here.

ProblemType: Package
DistroRelease: Ubuntu 14.04
Package: zoneminder 1.26.5-1ubuntu3
ProcVersionSignature: Ubuntu 3.13.0-39.66-lowlatency 3.13.11.8
Uname: Linux 3.13.0-39-lowlatency i686
ApportVersion: 2.14.1-0ubuntu3.5
Architecture: i386
Date: Sat Nov 15 03:05:51 2014
DuplicateSignature: package:zoneminder:1.26.5-1ubuntu3:subprocess installed post-installation script returned error exit status 255
ErrorMessage: subprocess installed post-installation script returned error exit status 255
InstallationDate: Installed on 2014-11-15 (0 days ago)
InstallationMedia: Ubuntu-Studio 14.04.1 LTS "Trusty Tahr" - Release i386 (20140722.1)
SourcePackage: zoneminder
Title: package zoneminder 1.26.5-1ubuntu3 failed to install/upgrade: subprocess installed post-installation script returned error exit status 255
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Jerre Domitilli (jerredomitilli) wrote :
tags: removed: need-duplicate-check
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in zoneminder (Ubuntu):
status: New → Confirmed
Revision history for this message
Allan Dyer (adyer) wrote :

The problem appears to be that the new version has added configuration data. The script zmupdate.pl is supposed to update the configuration in the mysql Config table, but it fails to compile because it depends on a new configuration value, ZM_DYN_DB_VERSION, which has not been created yet.
I found a file /undef.log containing the error:
---
12/29/14 20:39:24.043538 undef[1400].ERR-zm_config.cpp/259 [Config mismatch, expected 215 items, read 202. Try running 'zmupdate.pl -f' to reload config.]
Attempting to run zmupdate.pl -f gives:
Bareword "ZM_DYN_DB_VERSION" not allowed while "strict subs" in use at /usr/bin/zmupdate.pl line 111.
BEGIN not safe after errors--compilation aborted at /usr/bin/zmupdate.pl line 149.
---
It seems there are some other new configuration values.
Workaround:
Use a script to update the Config stored in the database:
---
#!/usr/bin/perl -w
#
# Fix the ZoneMinder configuration table with data from ZoneMinder:ConfigData package

use strict;
use bytes;

use ZoneMinder::ConfigAdmin qw(:all);
loadConfigFromDB();
saveConfigToDB();
exit;
---
Running the script gave:
---
./zmfix.pl
Loading config from DB
No option 'ZM_LOCAL_BGR_INVERT' found, removing at /usr/share/perl5/ZoneMinder/ConfigAdmin.pm line 89.
No option 'ZM_Y_IMAGE_DELTAS' found, removing at /usr/share/perl5/ZoneMinder/ConfigAdmin.pm line 89.
No option 'ZM_BLEND_ALARMED_IMAGES' found, removing at /usr/share/perl5/ZoneMinder/ConfigAdmin.pm line 89.
No option 'ZM_V4L2_CAPTURE_FIELDS' found, removing at /usr/share/perl5/ZoneMinder/ConfigAdmin.pm line 89.
Saving config to DB
---
Checking the database, there are now 215 rows in Config.
Trying the update script again:
---
zmupdate.pl -f

Freshening configuration in database
Loading config from DB
Saving config to DB

Previous versions of ZoneMinder used the MyISAM database engine.
However, the recommended database engine is InnoDB.

Hint: InnoDB tables are much less likely to be corrupted during an unclean shutdown.

Press 'y' to convert your tables to InnoDB or 'n' to skip : y

Converting MyISAM tables to InnoDB. Please wait.
---
The conversion has not finished yet, so I cannot confirm that this workaround works, but it does allow zmupdate.pl to run.
A proper fix would modify zmupdate.pl so that it is not dependant on configuration values that do not exist in old versions.

Revision history for this message
Allan Dyer (adyer) wrote :

My workaround (above) worked, but I also had to rename the website configuration file /etc/apache2/sites-enabled/rename 001-zoneminder to 001-zoneminder.conf because of the new version of apache.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.