Page 1 of 1

dpkg -i errors

Posted: Fri Jun 05, 2009 10:04 pm
by gian
hello,

tried installing the .deb but I get these errors...

gian@recorder:~$ sudo dpkg -i zoneminder_1.24.1-pre-1_amd64.deb
[sudo] password for gian:
(Reading database ... 50291 files and directories currently installed.)
Preparing to replace zoneminder 1.24.1-pre-1 (using zoneminder_1.24.1-pre-1_amd64.deb) ...
$Stopping ZoneMinder: DBI connect('database=zm;host=localhost','zmuser',...) failed: Access denied for user 'zmuser'@'localhost' (using password: YES) 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.
Zoneminder already stopped

Unpacking replacement zoneminder ...
Setting up zoneminder (1.24.1-pre-1) ...
Starting ZoneMinder: DBI connect('database=zm;host=localhost','zmuser',...) failed: Access denied for user 'zmuser'@'localhost' (using password: YES) 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 (--install):
subprocess post-installation script returned error exit status 255
Processing triggers for man-db ...
Errors were encountered while processing:
zoneminder


<alas> what a mess!

Anyone can help me?
paid support anybody?

thanks for your time,
-Gian

Posted: Fri Jun 05, 2009 10:17 pm
by cordel

Code: Select all

Starting ZoneMinder: DBI connect('database=zm;host=localhost','zmuser',...) failed: Access denied for user 'zmuser'@'localhost' (using password: YES) at /usr/share/perl5/ZoneMinder/Config.pm line 89 
Basically means that you have the wrong user or password setup in /etc/zm.conf for the configured DB. Either change the user/pass in zm.conf to match the user/pass you setup in MySQL or visa/versa, they just need to match.

Posted: Fri Jun 05, 2009 10:41 pm
by gian
Cordel,

thanks for your kind reply.

Well, if I check with phpmyadmin, I have no ZM db yes, which makes sense, since I'm installing ZM...

My previous install of v1.23.3 was uninstalled, and I guess that the remove dropped the db.

-Gian

Posted: Sun Jun 07, 2009 12:44 pm
by gian
Cordel,

the database ZM does not exist on the system... yet.

Shouldn't it be created by the install process?

-G

Posted: Mon Jun 08, 2009 7:11 am
by Syrinx
gian wrote:Cordel,

the database ZM does not exist on the system... yet.

Shouldn't it be created by the install process?

-G
MySql access is via a separate set of users maintained independently by MySql. In other words, you may run dpkg as root, but that doesn't mean root has access to MySql.

So unless dpkg asked you for your MySql user, the answer to your question is no. It won't be created by the install process.

Posted: Mon Jun 08, 2009 8:44 am
by gian
Syrinx,

thanks for your kind reply.

I understand what you mean, and that's logic.

However, in no one of the tutorial I found is mentioned that I have to create manually the db or the user...

When I installed with Synaptics, I remember a window asking for root pwd for MySQL, but this does not come out with this .deb.

Posted: Mon Jun 08, 2009 10:30 am
by gian
ok, I managed to create db and user manually.

Now I get this error:

*****************************************************
gian@recorder:~$ sudo dpkg -i zoneminder_1.24.1-pre-1_amd64.deb
(Reading database ... 50291 files and directories currently installed.)
Preparing to replace zoneminder 1.24.1-pre-1 (using zoneminder_1.24.1-pre-1_amd64.deb) ...
$Stopping ZoneMinder: DBD::mysql::st execute failed: Table 'zm.Config' doesn't exist at /us r/share/perl5/ZoneMinder/Config.pm line 92.
Can't execute: Table 'zm.Config' doesn't exist at /usr/share/perl5/ZoneMinder/Config.pm lin e 100
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.
Zoneminder already stopped

Unpacking replacement zoneminder ...
Setting up zoneminder (1.24.1-pre-1) ...
Starting ZoneMinder: DBD::mysql::st execute failed: Table 'zm.Config' doesn't exist at /usr /share/perl5/ZoneMinder/Config.pm line 92.
Can't execute: Table 'zm.Config' doesn't exist at /usr/share/perl5/ZoneMinder/Config.pm lin e 100
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 (--install):
subprocess post-installation script returned error exit status 255
Processing triggers for man-db ...
Errors were encountered while processing:
zoneminder
gian@recorder:~$

****************************************

Posted: Mon Jun 08, 2009 12:01 pm
by gian
ok, I had to to all the mysql stuff by hand, and then the install went on fine.

thanks just the same,
-Gian

Posted: Mon Jun 08, 2009 12:34 pm
by gian
now, here is a different case.

I tried to install v.1.24.1 .deb on another Jaunty box without removing the previous install.

Here are the errors:

*************************************************
gian@intragnola:~$ gian@intragnola:~$ sudo dpkg -i zoneminder_1.24.1-pre-1_amd64.deb
(Reading database ... 110800 files and directories currently installed.)
Preparing to replace zoneminder 1.23.3-3ubuntu1 (using zoneminder_1.24.1-pre-1_amd64.deb) ...
$Stopping ZoneMinder: success

Unpacking replacement zoneminder ...
Setting up zoneminder (1.24.1-pre-1) ...
Installing new version of config file /etc/zm/zm.conf ...
Starting ZoneMinder: failure

invoke-rc.d: initscript zoneminder, action "start" failed.
dpkg: error processing zoneminder (--install):
subprocess post-installation script returned error exit status 255
Processing triggers for man-db ...
Errors were encountered while processing:
zoneminder

**********************************************

What went wrong here?

-G

Posted: Mon Jun 08, 2009 1:09 pm
by RemoteCamera

Posted: Mon Jun 08, 2009 6:55 pm
by cordel
I would suspect that instead of using the install parameter for dpkg that you should be using the update parameter for packages that are already installed.