Recent Ubuntu update removed zoneminder

Forum for questions and support relating to the 1.24.x releases only.
Locked
User avatar
caladeira
Posts: 64
Joined: Wed Dec 05, 2007 10:57 am
Location: Lisbon

Recent Ubuntu update removed zoneminder

Post by caladeira »

Hello!

I'm using Ubuntu server 10.04.1 and have installed zoneminder 1.24.2 trough apt-get.

Usually, all updates are done using webmin and work without problems.

However, last update flagged zoneminder to remove and actually removed it.
Here's the log (/var/log/apt/history.log):

Code: Select all

Start-Date: 2010-09-25  20:04:51
Install: apache2-mpm-worker (2.2.14-5ubuntu8.2)
Upgrade: apache2.2-bin (2.2.14-5ubuntu8, 2.2.14-5ubuntu8.2), php5-gd (5.3.2-1ubuntu4.2, 5.3.2-1ubuntu4.5), apache2 (2.2.14-5ubuntu8, 2.2.14-5ubunt$
Remove: php5 (5.3.2-1ubuntu4.2), apache2-mpm-prefork (2.2.14-5ubuntu8), zoneminder (1.24.2-2build3), phpmyadmin (3.3.2-1), libapache2-mod-php5 (5.$
End-Date: 2010-09-25  20:05:55 
Once I noticed, I try to reinstall zoneminder trough apt-get without success.
Zoneminder seams to be installed, but there is some database problem:

Code: Select all

$ sudo apt-get install zoneminder
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
  linux-headers-2.6.32-21 linux-headers-2.6.32-23 linux-headers-2.6.32-23-generic-pae linux-headers-2.6.32-21-generic-pae
Use 'apt-get autoremove' to remove them.
The following NEW packages will be installed:
  zoneminder
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 0B/1,541kB of archives.
After this operation, 6,693kB of additional disk space will be used.
Selecting previously deselected package zoneminder.
(Reading database ... 133724 files and directories currently installed.)
Unpacking zoneminder (from .../zoneminder_1.24.2-2build3_i386.deb) ...
Processing triggers for man-db ...
Processing triggers for ureadahead ...
Setting up zoneminder (1.24.2-2build3) ...
Starting ZoneMinder: DBI connect('database=zm;host=localhost','zmuser',...) failed: Unknown database 'zm' at /usr/share/perl5/ZoneMinder/Config.pm line 89
Can't call method "prepare_cached" on an undefined value at /usr/share/perl5/ZoneMinder/Config.pm line 91.
BEGIN failed--compilation aborted at /usr/share/perl5/ZoneMinder/Config.pm line 100.
Compilation failed in require at /usr/share/perl5/ZoneMinder.pm line 33.
BEGIN failed--compilation aborted at /usr/share/perl5/ZoneMinder.pm line 33.
Compilation failed in require at /usr/bin/zmpkg.pl line 45.
BEGIN failed--compilation aborted at /usr/bin/zmpkg.pl line 45.
failure

invoke-rc.d: initscript zoneminder, action "start" failed.
dpkg: error processing zoneminder (--configure):
 subprocess installed post-installation script returned error exit status 255
Errors were encountered while processing:
 zoneminder
E: Sub-process /usr/bin/dpkg returned an error code (1) 
Does anyone has any clue on how to solve this without reinstall everything?

Thanks.
hengst
Posts: 28
Joined: Sun Sep 26, 2010 7:15 am
Location: Netherlands

Post by hengst »

looks like the database is missing :
Starting ZoneMinder: DBI connect('database=zm;host=localhost','zmuser',...) failed: Unknown database 'zm' at /usr/share/perl5/ZoneMinder/Config.pm line 89
is MysqL started ?, and does the database ZM exists ?
User avatar
caladeira
Posts: 64
Joined: Wed Dec 05, 2007 10:57 am
Location: Lisbon

Post by caladeira »

Hi there!

The database is missing, but when I install using apt-get the database should be created, or am I imagining things?
PeterHoward
Posts: 319
Joined: Thu Jul 20, 2006 1:07 am
Location: Australia

Post by PeterHoward »

caladeira wrote:Hi there!

The database is missing, but when I install using apt-get the database should be created, or am I imagining things?
My guess is that there's enough of the package left that it thinks that zoneminder is still installed so it's doing an upgrade rather than a fresh install.

Try purging zoneminder (e.g. dpkg --purge zonedminer) and reinstalling.
User avatar
caladeira
Posts: 64
Joined: Wed Dec 05, 2007 10:57 am
Location: Lisbon

Post by caladeira »

Hi Peter,

Your suggestion solve my problem.

After the:

sudo dpkg --purge zonedminer

I run:

sudo apt-get install zoneminder

However, since the database has been deleted already, all my recorded frames and zoneminder configuration are lost.

Unfortunately I have no test system to try duplicate this situation.
I'd like to know why zoneminder was removed by apt-get at first place!

Thank you Peter.
Flasheart
Posts: 342
Joined: Thu Jul 06, 2006 2:27 pm

Post by Flasheart »

I think that would be a question for the ubuntu guys.

There have been quite a few recent issues with ubuntu updates breaking zoneminder, but more commonly because it changes the start order so zm attempts to start before mysql is ready to accept it.

This is one of the reasons I've returned to Debian for all my servers now.
srvblues00
Posts: 2
Joined: Sun Feb 14, 2010 10:26 pm

Post by srvblues00 »

I run ZoneMinder on Ubuntu 10.04 server edition in Sun Virtualbox.. it has saved me many times! I can create a snapshot of the VM before I do any updates or make changes. If anything goes wrong, I can revert back to the old working setup and try again.
PeterHoward
Posts: 319
Joined: Thu Jul 20, 2006 1:07 am
Location: Australia

Post by PeterHoward »

Flasheart wrote:I think that would be a question for the ubuntu guys.

There have been quite a few recent issues with ubuntu updates breaking zoneminder, but more commonly because it changes the start order so zm attempts to start before mysql is ready to accept it.

This is one of the reasons I've returned to Debian for all my servers now.
Did you raise a bug in the Ubuntu bug system? Although (ironically) I'm not listed as the maintainer there, I do check occasionally, and I can try to put a fix into the next debian version.

Alternately I can roll an Ubuntu-specific package and put it on my site.

PJH
PeterHoward
Posts: 319
Joined: Thu Jul 20, 2006 1:07 am
Location: Australia

Post by PeterHoward »

Note however, due to Zoneminder actually getting into debian TESTING and staying there for more than 5 minutes (thanks to Vagrant Cascadian, an Ubuntu developer who uses zm at freegeek.org and has become co-maintainer) there won't be any more updates until - hopefuly - squeeze is released with zm in the stable repo.

PJH
Flash_
Posts: 441
Joined: Wed Jan 11, 2006 12:19 pm

Post by Flash_ »

No I didn't report my issues to Ubuntu and you're right, such things should be.

I have several problems with Ubuntu other than it breaking upgrades (all distros do this) namely significant performance degradation on the same hardware running the same things as debian (between 40-200% reduction in load after debianising on 3 servers), and I has some ideology problems with the direction

Other people have questioned my load figures above - I've backed it up with munin graphs but can't offer a solid reason other than the number of additional processes ubuntu requires.

It's no big hardship to me, debian does a really solid job. Perhaps I'm just too conservative to embrace some of the core changes ubuntu is undergoing.

Thanks, as ever, for your work with the packaging and getting it into the repos. After literally days spend building zoneminder the first time, it is wonderful to just type one command and get it running... Now, just to automate the shared memory thing... :)
Locked