Error installing on 18.04

Forum for questions and support relating to the 1.30.x releases only.
Locked
stevewrightnz1
Posts: 55
Joined: Mon Jun 08, 2015 9:57 am
Location: New Zealand
Contact:

Error installing on 18.04

Post by stevewrightnz1 »

Hi all,

I get the following error when trying to install ZM on Ubuntu 18.04 when following https://wiki.zoneminder.com/Ubuntu_Serv ... e_easy_way:-

Any help would be appreciated.

Steve

root@zm:/home/steve# apt install /tmp/zoneminder-1.30.4-bionic-amd64.deb
Reading package lists... Done
Building dependency tree
Reading state information... Done
Note, selecting 'zoneminder' instead of '/tmp/zoneminder-1.30.4-bionic-amd64.deb'
The following NEW packages will be installed:
zoneminder
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/5,687 kB of archives.
After this operation, 36.5 MB of additional disk space will be used.
Get:1 /tmp/zoneminder-1.30.4-bionic-amd64.deb zoneminder amd64 1.30.4-bionic [5,687 kB]
Selecting previously unselected package zoneminder.
(Reading database ... 207473 files and directories currently installed.)
Preparing to unpack .../zoneminder-1.30.4-bionic-amd64.deb ...
Unpacking zoneminder (1.30.4-bionic) ...
Processing triggers for ureadahead (0.100.0-20) ...
Setting up zoneminder (1.30.4-bionic) ...
Failed to stop zoneminder.service: Unit zoneminder.service not loaded.
dpkg: error processing package zoneminder (--configure):
installed zoneminder package post-installation script subprocess returned error exit status 5
Processing triggers for systemd (237-3ubuntu10.3) ...
Processing triggers for man-db (2.8.3-2) ...
Processing triggers for ureadahead (0.100.0-20) ...
Errors were encountered while processing:
zoneminder
E: Sub-process /usr/bin/dpkg returned an error code (1)
bbunge
Posts: 2934
Joined: Mon Mar 26, 2012 11:40 am
Location: Pennsylvania

Re: Error installing on 18.04

Post by bbunge »

Apache or NGINX?
MySQL or Mariadb?

Ah, it looks like you have a Zoneminder package via a PPA loaded. Your system said: Note, selecting 'zoneminder' instead of '/tmp/zoneminder-1.30.4-bionic-amd64.deb'

Did you upgrade your system from 16.04 with Zoneminder installed? If so you need to install the Bionic package with:
apt-get -y --allow-downgrades install /tmp/zoneminder-1.30.4-bionic-amd64.deb
stevewrightnz1
Posts: 55
Joined: Mon Jun 08, 2015 9:57 am
Location: New Zealand
Contact:

Re: Error installing on 18.04

Post by stevewrightnz1 »

OK, still having issues.
Apache2
MySQL
Upgraded to 18.04 with ZoneMinder in place

Have done the following:-
Removed ZoneMinder using:-
apt remove zoneminder
root@zm:/home/steve# apt remove zoneminder
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
libappconfig-perl libclass-inspector-perl libclass-load-perl libclass-std-fast-perl libclass-std-perl libcommon-sense-perl
libconvert-binhex-perl libdata-optlist-perl libdate-manip-perl libdevice-serialport-perl libemail-date-format-perl libimage-base-bundle-perl
libimage-info-perl libio-interface-perl libio-sessiondata-perl libio-socket-multicast-perl libio-stringy-perl libjs-mootools libjson-any-perl
libjson-xs-perl libmime-lite-perl libmime-tools-perl libmime-types-perl libmodule-implementation-perl libnet-sftp-foreign-perl
libossp-uuid-perl libossp-uuid16 libpackage-stash-perl libpackage-stash-xs-perl libparams-util-perl libphp-serialization-perl libsoap-lite-perl
libsoap-wsdl-perl libsub-install-perl libsys-cpu-perl libsys-meminfo-perl libsys-mmap-perl libtask-weaken-perl libtemplate-perl
libterm-readkey-perl libtypes-serialiser-perl liburi-encode-perl libxmlrpc-lite-perl
Use 'apt autoremove' to remove them.
The following packages will be REMOVED:
zoneminder
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 36.5 MB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 215742 files and directories currently installed.)
Removing zoneminder (1.30.4-bionic) ...
apache2_invoke zoneminder prerm: No action required
Processing triggers for man-db (2.8.3-2) ...

apt purge zoneminder
root@zm:/home/steve# apt purge zoneminder
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
libappconfig-perl libclass-inspector-perl libclass-load-perl libclass-std-fast-perl libclass-std-perl libcommon-sense-perl
libconvert-binhex-perl libdata-optlist-perl libdate-manip-perl libdevice-serialport-perl libemail-date-format-perl libimage-base-bundle-perl
libimage-info-perl libio-interface-perl libio-sessiondata-perl libio-socket-multicast-perl libio-stringy-perl libjs-mootools libjson-any-perl
libjson-xs-perl libmime-lite-perl libmime-tools-perl libmime-types-perl libmodule-implementation-perl libnet-sftp-foreign-perl
libossp-uuid-perl libossp-uuid16 libpackage-stash-perl libpackage-stash-xs-perl libparams-util-perl libphp-serialization-perl libsoap-lite-perl
libsoap-wsdl-perl libsub-install-perl libsys-cpu-perl libsys-meminfo-perl libsys-mmap-perl libtask-weaken-perl libtemplate-perl
libterm-readkey-perl libtypes-serialiser-perl liburi-encode-perl libxmlrpc-lite-perl
Use 'apt autoremove' to remove them.
The following packages will be REMOVED:
zoneminder*
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
(Reading database ... 207480 files and directories currently installed.)
Purging configuration files for zoneminder (1.30.4-bionic) ...

Reminder: to completely remove "zoneminder" it may be necessary
* to delete database using the following sample command:
sudo mysqladmin --defaults-file=/etc/mysql/debian.cnf -f drop zm
* to delete remaining data files in /var/cache/zoneminder.

apache2_invoke zoneminder postrm: No action required
Processing triggers for ureadahead (0.100.0-20) ...
Processing triggers for systemd (237-3ubuntu10.3) ...

Assumed that removing the dependencies is not necessary????

tried install with:-
wget --no-check-certificate https://173.163.189.225/zoneminder-1.30 ... -amd64.deb -P /tmp/
apt-get -y --allow-downgrades install /tmp/zoneminder-1.30.4-bionic-amd64.deb

errors out with:-

root@zm:/home/steve# apt-get -y --allow-downgrades install /tmp/zoneminder-1.30.4-bionic-amd64.deb
Reading package lists... Done
Building dependency tree
Reading state information... Done
Note, selecting 'zoneminder' instead of '/tmp/zoneminder-1.30.4-bionic-amd64.deb'
The following NEW packages will be installed:
zoneminder
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/5,687 kB of archives.
After this operation, 36.5 MB of additional disk space will be used.
Get:1 /tmp/zoneminder-1.30.4-bionic-amd64.deb zoneminder amd64 1.30.4-bionic [5,687 kB]
Selecting previously unselected package zoneminder.
(Reading database ... 207477 files and directories currently installed.)
Preparing to unpack .../zoneminder-1.30.4-bionic-amd64.deb ...
Unpacking zoneminder (1.30.4-bionic) ...
Processing triggers for ureadahead (0.100.0-20) ...
Setting up zoneminder (1.30.4-bionic) ...
Use of uninitialized value $Config{"ZM_DIR_EVENTS"} in pattern match (m//) at /usr/bin/zmupdate.pl line 81.
Use of uninitialized value in concatenation (.) or string at /usr/bin/zmupdate.pl line 81.
Use of uninitialized value in concatenation (.) or string at /usr/share/perl5/ZoneMinder/Logger.pm line 154.
Use of uninitialized value in concatenation (.) or string at /usr/share/perl5/ZoneMinder/Logger.pm line 199.
Please give a valid option
Usage:
zmupdate.pl -c,--check | -f,--freshen | -v<version>,--version=<version> [-u<dbuser> -p<dbpass>]

Options:
-c, --check - Check for updated versions of ZoneMinder
-f, --freshen - Freshen the configuration in the database. Equivalent of old zmconfig.pl -noi
--migrate-events - Update database structures as per USE_DEEP_STORAGE setting.
-v<version>, --version=<version> - Force upgrade to the current version from <version>
-u<dbuser>, --user=<dbuser> - Alternate DB user with privileges to alter DB
-p<dbpass>, --pass=<dbpass> - Password of alternate DB user with privileges to alter DB
-d<dir>,--dir=<dir> - Directory containing update files if not in default build location
-interactive - interact with the user
-nointeractive - do not interact with the user

dpkg: error processing package zoneminder (--configure):
installed zoneminder package post-installation script subprocess returned error exit status 255
Processing triggers for systemd (237-3ubuntu10.3) ...
Processing triggers for man-db (2.8.3-2) ...
Processing triggers for ureadahead (0.100.0-20) ...
Errors were encountered while processing:
zoneminder
E: Sub-process /usr/bin/dpkg returned an error code (1)
bbunge
Posts: 2934
Joined: Mon Mar 26, 2012 11:40 am
Location: Pennsylvania

Re: Error installing on 18.04

Post by bbunge »

Try to run the script to "patch" the 16.04 to 18.04 upgrade: https://wiki.zoneminder.com/Shell_scrip ... 28MySQL.29

The shell script install method is the one sure way to get Zoneminder running on a fresh Ubuntu install...

I've run the upgrade procedure a couple of times over the past weekend with no issues. Have upgraded 16.04 with MySQL and Mariadb. Have upgraded with the Zoneminder marked hold and not marked hold. All have run successfully. If you continue to have issues reinstall Ubuntu. My recommendation is to stick with 16.04 until the next official release of Zoneminder which should be 1.32.x. As of now ZM 1.31.x works bur changes are still being made to the code.
stevewrightnz1
Posts: 55
Joined: Mon Jun 08, 2015 9:57 am
Location: New Zealand
Contact:

Re: Error installing on 18.04

Post by stevewrightnz1 »

Right, that fixed it.

Removed ZoneMinder, purged ZoneMinder, removed the MySQL zm database using the command thrown up by the purge process, reinstalled using the shell script - link above, it threw a couple of errors, I'm guessing because there was nothing left to upgrade. All seems to be OK though and I can now access the interface and add cameras. All seems to be working fine.

Thanks for the help.

Steve
Locked