DBI connect('database=zm;host=localhost','zmuser',...) failed: Unknown database 'zm'

Forum for questions and support relating to the 1.29.x releases only.
Locked
ngauruhoe
Posts: 25
Joined: Sun Jan 03, 2016 5:26 pm

DBI connect('database=zm;host=localhost','zmuser',...) failed: Unknown database 'zm'

Post by ngauruhoe »

Followed these "Ubuntu Server 15.04 or 15.10 64-bit with Zoneminder 1.29.0 the easy way" instructions at https://wiki.zoneminder.com/Ubuntu_Serv ... e_easy_way to perform a brandnew install.

Executing step "apt-get install zoneminder php5-gd" run into the following error:

Code: Select all

Setting up zoneminder (1.29.0-wily) ...
[b]DBI connect('database=zm;host=localhost','zmuser',...) failed: Unknown database 'zm' at /usr/share/perl5/ZoneMinder/Config.pm line 92.[/b]
Can't connect to db at /usr/share/perl5/ZoneMinder/Config.pm line 119.
BEGIN failed--compilation aborted at /usr/share/perl5/ZoneMinder/Config.pm line 119.
Compilation failed in require at /usr/bin/zmupdate.pl line 71.
BEGIN failed--compilation aborted at /usr/bin/zmupdate.pl line 71.
dpkg: error processing package zoneminder (--configure):
 subprocess installed post-installation script returned error exit status 255
Setting up liblwp-protocol-https-perl (6.06-2) ...
Processing triggers for libc-bin (2.21-0ubuntu4.1) ...
Processing triggers for ureadahead (0.100.0-19) ...
Processing triggers for systemd (225-1ubuntu9) ...
Errors were encountered while processing:
 zoneminder
E: Sub-process /usr/bin/dpkg returned an error code (1)
root@GuardianServer:/home/skywalker#
No idea what I should do next. Thanks for your help.

Tried to add the full log as an attachment in both .pdf and .txt format but those formats are not accepted. The FAQ doesn't mention which ones are acceptable. Also tried to include inline but then run into 'too many characters'...... So, hope this is sufficient.
bbunge
Posts: 2956
Joined: Mon Mar 26, 2012 11:40 am
Location: Pennsylvania

Re: DBI connect('database=zm;host=localhost','zmuser',...) failed: Unknown database 'zm'

Post by bbunge »

You need to push on with the next steps to manually create the database. The error you see is caused by some remaining code that tries to upgrade the database (will actually do this when you do an upgrade from a prior ZM version). The package maintainer announced a while back that the Ubuntu installs were going to be like the Debian installs where you have to manually install the database.

I ran this procedure on a fresh Ubuntu 14.04 server yesterday with no problems.

BB
ngauruhoe
Posts: 25
Joined: Sun Jan 03, 2016 5:26 pm

Re: DBI connect('database=zm;host=localhost','zmuser',...) failed: Unknown database 'zm'

Post by ngauruhoe »

Sorrie for the late response. Thank you, it worked.
Locked