16.04.02 - ubuntu
Setting up zoneminder (1.31.0~20170609142929-xenial) ...
Database already at version 1.31.0, update aborted.
/var/lib/dpkg/info/zoneminder.postinst: 47: /var/lib/dpkg/info/zoneminder.postinst: -u: not found
dpkg: error processing package zoneminder (--configure):
subprocess installed post-installation script returned error exit status 127
Errors were encountered while processing:
zoneminder
E: Sub-process /usr/bin/dpkg returned an error code (1)
Looking at the zoeminder.postinst line 47
OLD_DIR_EVENTS=mysql -u $ZM_DB_USER --password="$ZM_DB_PASS" -h $ZM_DB_HOST -N -B $ZM_DB_NAME <<EOF
The way i resolved the issue was to add a space between =mysql to = mysql
Database already at version 1.31.0, update aborted.
mysql: [Warning] Using a password on the command line interface can be insecure.
events
Value of ZM_DIR_EVENTS is
Freshening configuration in database
Loading config from DB 219 entries
Saving config to DB 220 entries
Done Updating, starting ZoneMinder
Thought i would make a post , just in case, also if i should be logging else where please point me in the right direction