dpkg -i errors

Forum for questions and support relating to the 1.24.x releases only.
Locked
gian
Posts: 73
Joined: Sun Mar 22, 2009 7:51 pm

dpkg -i errors

Post 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
User avatar
cordel
Posts: 5210
Joined: Fri Mar 05, 2004 4:47 pm
Location: /USA/Washington/Seattle

Post 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.
gian
Posts: 73
Joined: Sun Mar 22, 2009 7:51 pm

Post 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
gian
Posts: 73
Joined: Sun Mar 22, 2009 7:51 pm

Post by gian »

Cordel,

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

Shouldn't it be created by the install process?

-G
Syrinx
Posts: 11
Joined: Wed Apr 22, 2009 7:13 am
Location: San Jose, CA, USA

Post 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.
gian
Posts: 73
Joined: Sun Mar 22, 2009 7:51 pm

Post 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.
gian
Posts: 73
Joined: Sun Mar 22, 2009 7:51 pm

Post 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:~$

****************************************
gian
Posts: 73
Joined: Sun Mar 22, 2009 7:51 pm

Post 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
gian
Posts: 73
Joined: Sun Mar 22, 2009 7:51 pm

Post 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
RemoteCamera
Posts: 3
Joined: Mon Jun 08, 2009 12:57 pm

Post by RemoteCamera »

User avatar
cordel
Posts: 5210
Joined: Fri Mar 05, 2004 4:47 pm
Location: /USA/Washington/Seattle

Post 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.
Locked