Error 255 amongst other things

Forum for questions and support relating to the 1.24.x releases only.
Fitch
Posts: 105
Joined: Sat Oct 31, 2009 4:01 pm
Location: Hartlepool, U.K.
Contact:

Error 255 amongst other things

Post by Fitch » Sat Oct 31, 2009 4:15 pm

Am I missing something here?
Please talk slowly and in single syllables as I only entered the world of Linux 6 days ago, so I am a newbie in the extreme....

This is as far as I got with the damn installer:
brafferton@Cameras:~$ sudo aptitude update
[sudo] password for brafferton:
Writing extended state information... Done
Hit http://archive.canonical.com jaunty Release.gpg
Ign http://archive.canonical.com jaunty/partner Translation-en_GB
Hit http://archive.ubuntu.com karmic Release.gpg
Hit http://gb.archive.ubuntu.com jaunty-backports Release.gpg
Ign http://gb.archive.ubuntu.com jaunty-backports/main Translation-en_GB
Ign http://gb.archive.ubuntu.com jaunty-backports/restricted Translation-en_GB
Get:1 http://archive.ubuntu.com karmic/main Translation-en_GB [63.7kB]
Hit http://archive.canonical.com jaunty Release
Ign http://gb.archive.ubuntu.com jaunty-backports/universe Translation-en_GB
Ign http://gb.archive.ubuntu.com jaunty-backports/multiverse Translation-en_GB
Hit http://gb.archive.ubuntu.com jaunty-backports Release
Hit http://archive.canonical.com jaunty/partner Packages
Hit http://gb.archive.ubuntu.com jaunty-backports/main Packages
Get:2 http://archive.ubuntu.com karmic/restricted Translation-en_GB [3,402B]
Get:3 http://archive.ubuntu.com karmic/universe Translation-en_GB [33.2kB]
Hit http://gb.archive.ubuntu.com jaunty-backports/restricted Packages
Hit http://gb.archive.ubuntu.com jaunty-backports/universe Packages
Hit http://gb.archive.ubuntu.com jaunty-backports/multiverse Packages
Get:4 http://archive.ubuntu.com karmic/multiverse Translation-en_GB [43.8kB]
Hit http://archive.ubuntu.com karmic-updates Release.gpg
Ign http://archive.ubuntu.com karmic-updates/main Translation-en_GB
Ign http://archive.ubuntu.com karmic-updates/restricted Translation-en_GB
Ign http://archive.ubuntu.com karmic-updates/universe Translation-en_GB
Ign http://archive.ubuntu.com karmic-updates/multiverse Translation-en_GB
Hit http://archive.ubuntu.com karmic-security Release.gpg
Ign http://archive.ubuntu.com karmic-security/main Translation-en_GB
Ign http://archive.ubuntu.com karmic-security/restricted Translation-en_GB
Ign http://archive.ubuntu.com karmic-security/universe Translation-en_GB
Ign http://archive.ubuntu.com karmic-security/multiverse Translation-en_GB
Hit http://archive.ubuntu.com karmic Release
Hit http://archive.ubuntu.com karmic-updates Release
Hit http://archive.ubuntu.com karmic-security Release
Hit http://archive.ubuntu.com karmic/main Packages
Hit http://archive.ubuntu.com karmic/restricted Packages
Hit http://archive.ubuntu.com karmic/main Sources
Hit http://archive.ubuntu.com karmic/restricted Sources
Hit http://archive.ubuntu.com karmic/universe Packages
Hit http://archive.ubuntu.com karmic/universe Sources
Hit http://archive.ubuntu.com karmic/multiverse Packages
Hit http://archive.ubuntu.com karmic/multiverse Sources
Hit http://archive.ubuntu.com karmic-updates/main Packages
Hit http://archive.ubuntu.com karmic-updates/restricted Packages
Hit http://archive.ubuntu.com karmic-updates/main Sources
Hit http://archive.ubuntu.com karmic-updates/restricted Sources
Hit http://archive.ubuntu.com karmic-updates/universe Packages
Hit http://archive.ubuntu.com karmic-updates/universe Sources
Hit http://archive.ubuntu.com karmic-updates/multiverse Packages
Hit http://archive.ubuntu.com karmic-updates/multiverse Sources
Hit http://archive.ubuntu.com karmic-security/main Packages
Hit http://archive.ubuntu.com karmic-security/restricted Packages
Hit http://archive.ubuntu.com karmic-security/main Sources
Hit http://archive.ubuntu.com karmic-security/restricted Sources
Hit http://archive.ubuntu.com karmic-security/universe Packages
Hit http://archive.ubuntu.com karmic-security/universe Sources
Hit http://archive.ubuntu.com karmic-security/multiverse Packages
Hit http://archive.ubuntu.com karmic-security/multiverse Sources
Fetched 144kB in 0s (192kB/s)
Reading package lists... Done

brafferton@Cameras:~$ sudo aptitude safe-upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Reading extended state information
Initialising package states... Done
The following packages will be REMOVED:
binutils-static{u}
The following partially installed packages will be configured:
zoneminder
0 packages upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
Need to get 0B of archives. After unpacking 1,425kB will be freed.
Do you want to continue? [Y/n/?] y
(Reading database ... 127591 files and directories currently installed.)
Removing binutils-static ...
Setting up zoneminder (1.24.2-1) ...
Update agent starting at 09/10/31 15:10:58

Initiating database upgrade to version 1.24.2
Please ensure that ZoneMinder is stopped on your system prior to upgrading the database.
Press enter to continue or ctrl-C to stop :

Do you wish to take a backup of your database prior to upgrading?
This may result in a large file in /tmp if you have a lot of events.
Press 'y' for a backup or 'n' to continue : n

Upgrading database to version 1.24.2
Loading config from DB
Saving config to DB
Can't find upgrade from version '1.24.2' at /usr/bin/zmupdate.pl line 889, <STDIN> line 2.
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)
A package failed to install. Trying to recover:
Setting up zoneminder (1.24.2-1) ...
Update agent starting at 09/10/31 15:11:09

Initiating database upgrade to version 1.24.2
Please ensure that ZoneMinder is stopped on your system prior to upgrading the database.
Press enter to continue or ctrl-C to stop :

Do you wish to take a backup of your database prior to upgrading?
This may result in a large file in /tmp if you have a lot of events.
Press 'y' for a backup or 'n' to continue : n

Upgrading database to version 1.24.2
Loading config from DB
Saving config to DB
Can't find upgrade from version '1.24.2' at /usr/bin/zmupdate.pl line 889, <STDIN> line 2.
dpkg: error processing zoneminder (--configure):
subprocess installed post-installation script returned error exit status 255
Errors were encountered while processing:
zoneminder
Reading package lists... Done
Building dependency tree
Reading state information... Done
Reading extended state information
Initialising package states... Done
Writing extended state information... Done

brafferton@Cameras:~$ sudo aptitude install zoneminder
Reading package lists... Done
Building dependency tree
Reading state information... Done
Reading extended state information
Initialising package states... Done
The following partially installed packages will be configured:
zoneminder
0 packages upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 0B of archives. After unpacking 0B will be used.
Writing extended state information... Done
Setting up zoneminder (1.24.2-1) ...
Update agent starting at 09/10/31 15:11:50

Initiating database upgrade to version 1.24.2
Please ensure that ZoneMinder is stopped on your system prior to upgrading the database.
Press enter to continue or ctrl-C to stop :

Do you wish to take a backup of your database prior to upgrading?
This may result in a large file in /tmp if you have a lot of events.
Press 'y' for a backup or 'n' to continue : n

Upgrading database to version 1.24.2
Loading config from DB
Saving config to DB
Can't find upgrade from version '1.24.2' at /usr/bin/zmupdate.pl line 889, <STDIN> line 2.
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)
A package failed to install. Trying to recover:
Setting up zoneminder (1.24.2-1) ...
Update agent starting at 09/10/31 15:11:59

Initiating database upgrade to version 1.24.2
Please ensure that ZoneMinder is stopped on your system prior to upgrading the database.
Press enter to continue or ctrl-C to stop :

Do you wish to take a backup of your database prior to upgrading?
This may result in a large file in /tmp if you have a lot of events.
Press 'y' for a backup or 'n' to continue : n

Upgrading database to version 1.24.2
Loading config from DB
Saving config to DB
Can't find upgrade from version '1.24.2' at /usr/bin/zmupdate.pl line 889, <STDIN> line 2.
dpkg: error processing zoneminder (--configure):
subprocess installed post-installation script returned error exit status 255
Errors were encountered while processing:
zoneminder
Reading package lists... Done
Building dependency tree
Reading state information... Done
Reading extended state information
Initialising package states... Done

Done.. I have been

Please help.

Fitch
Posts: 105
Joined: Sat Oct 31, 2009 4:01 pm
Location: Hartlepool, U.K.
Contact:

Post by Fitch » Mon Nov 02, 2009 5:07 pm

Since nobody has come up with an answer, I'll just wipe the system and put windows XP back on.
Since my business now has no security, I can no longer wait for an answer

TechGuy
Posts: 47
Joined: Sun Oct 18, 2009 8:16 pm

Post by TechGuy » Mon Nov 02, 2009 5:23 pm

Fitch wrote:Since nobody has come up with an answer, I'll just wipe the system and put windows XP back on.
Since my business now has no security, I can no longer wait for an answer
You don't need to run the upgrade script if your install 1.24.2 for the first time. Its for upgrading from previous versions of ZM.

Fitch
Posts: 105
Joined: Sat Oct 31, 2009 4:01 pm
Location: Hartlepool, U.K.
Contact:

Post by Fitch » Mon Nov 02, 2009 6:33 pm

By the time this screenshot was produced, I had already installed about 5 times previous.
So where is the initial install page?

TechGuy
Posts: 47
Joined: Sun Oct 18, 2009 8:16 pm

Post by TechGuy » Mon Nov 02, 2009 7:32 pm

Fitch wrote:By the time this screenshot was produced, I had already installed about 5 times previous.
So where is the initial install page?
That doesn't matter. It only applies if you are "Upgrading" from a previous verision. It doesn't matter if you install the 1.24.2 ten times. Its for applying updates to the SQL tables that have because the tables have been changed. It also wouldn't apply if you removed an older version of ZM, deleted the ZM database and re-installed 1.24.2

BTW: Do you have MySQL installed and Running?

Fitch
Posts: 105
Joined: Sat Oct 31, 2009 4:01 pm
Location: Hartlepool, U.K.
Contact:

Post by Fitch » Mon Nov 02, 2009 7:57 pm

I have mysql server version 5.1 installed
The iso I used was a mandrake version, so obviously I picked the wrong cd image.
I can see lots of stuff for debian and even folders for ubuntu, but no iso,
What do I do with the deb files that are in the download folder?

TechGuy
Posts: 47
Joined: Sun Oct 18, 2009 8:16 pm

Post by TechGuy » Mon Nov 02, 2009 9:27 pm

Fitch wrote:I have mysql server version 5.1 installed
The iso I used was a mandrake version, so obviously I picked the wrong cd image.
I can see lots of stuff for debian and even folders for ubuntu, but no iso,
What do I do with the deb files that are in the download folder?
Sorry, I can't help you there, I use Gentoo. Perhaps if you post your question on a Mandrake forum you get a good answer.

Fitch
Posts: 105
Joined: Sat Oct 31, 2009 4:01 pm
Location: Hartlepool, U.K.
Contact:

Post by Fitch » Tue Nov 03, 2009 10:49 am

Doubt it!

Anyway, the Mandrake cd was the wrong CD.
I use Debian (Ubuntu)

Fitch
Posts: 105
Joined: Sat Oct 31, 2009 4:01 pm
Location: Hartlepool, U.K.
Contact:

Post by Fitch » Wed Nov 04, 2009 5:52 pm

Is there anybody out there?

latest try...

Setting up zoneminder (1.24.1-1ubuntu2) ...
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/bin/zmupdate.pl line 49.
BEGIN failed--compilation aborted at /usr/bin/zmupdate.pl line 49.
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)


/usr/share/perl5/ZoneMinder/Config.pm is below.

# ================================================== ========================
#
# ZoneMinder Config Module, $Date: 2008-07-25 10:48:16 +0100 (Fri, 25 Jul 200 $, $Revision: 2612 $
# Copyright (C) 2001-2008 Philip Coombes
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
# ================================================== ========================
#
# This module contains the common definitions and functions used by the rest
# of the ZoneMinder scripts
#
package ZoneMinder::Config;

use 5.006;
use strict;
use warnings;

require Exporter;
require ZoneMinder::Base;

our @ISA = qw(Exporter ZoneMinder::Base);

# Items to export into callers namespace by default. Note: do not export
# names by default without a very good reason. Use EXPORT_OK instead.
# Do not simply export all your public functions/methods/constants.

# This allows declaration use ZoneMinder ':all';
# If you do not need this, moving things directly into @EXPORT or @EXPORT_OK
# will save memory.
our @EXPORT_CONFIG; # Get populated by BEGIN

our %EXPORT_TAGS = (
'constants' => [ qw(
ZM_PID
) ]
);
push( @{$EXPORT_TAGS{config}}, @EXPORT_CONFIG );
push( @{$EXPORT_TAGS{all}}, @{$EXPORT_TAGS{$_}} ) foreach keys %EXPORT_TAGS;

our @EXPORT_OK = ( @{ $EXPORT_TAGS{'all'} } );

our @EXPORT = qw();

our $VERSION = $ZoneMinder::Base::VERSION;

use constant ZM_PID => "/var/run/zm/zm.pid"; # Path to the ZoneMinder run pid file
use constant ZM_CONFIG => "/etc/zm/zm.conf"; # Path to the ZoneMinder config file

use Carp;

# Load the config from the database into the symbol table
BEGIN
{
no strict 'refs';

my $config_file = ZM_CONFIG;
( my $local_config_file = $config_file ) =~ s|^.*/|./|;
if ( -s $local_config_file && -r $local_config_file )
{
print( STDERR "Warning, overriding installed $local_config_file file with local copy\n" );
$config_file = $local_config_file;
}
open( CONFIG, "<".$config_file ) or croak( "Can't open config file '$config_file': $!" );
foreach my $str ( <CONFIG> )
{
next if ( $str =~ /^\s*$/ );
next if ( $str =~ /^\s*#/ );
my ( $name, $value ) = $str =~ /^\s*([^=\s]+)\s*=\s*(.+?)\s*$/;
$name =~ tr/a-z/A-Z/;
*{$name} = sub { $value };
push( @EXPORT_CONFIG, $name );
}
close( CONFIG );

use DBI;
my $dbh = DBI->connect( "DBI:mysql:database=".&ZM_DB_NAME.";host=".&ZM_DB_ HOST, &ZM_DB_USER, &ZM_DB_PASS );
my $sql = "select * from Config";
my $sth = $dbh->prepare_cached( $sql ) or croak( "Can't prepare '$sql': ".$dbh->errstr() );
my $res = $sth->execute() or croak( "Can't execute: ".$sth->errstr() );
while( my $config = $sth->fetchrow_hashref() )
{
*{$config->{Name}} = sub { $config->{Value} };
push( @EXPORT_CONFIG, $config->{Name} );
}
$sth->finish();
$dbh->disconnect();
}

1;
__END__

=head1 NAME

ZoneMinder::Config - ZoneMinder configuration module.

=head1 SYNOPSIS

use ZoneMinder::Config qw(:all);

=head1 DESCRIPTION

The ZoneMinder::Config module is used to import the ZoneMinder configuration from the database. It will do this at compile time in a BEGIN block and require access to the zm.conf file either in the current directory or in its defined location in order to determine database access details, configuration from this file will also be included. If the :all or :config tags are used then this configuration is exported into the namespace of the calling program or module.

Once the configuration has been imported then configuration variables are defined as constants and can be accessed directory by name, e.g.

$lang = ZM_LANG_DEFAULT;

=head2 EXPORT

None by default.
The :constants tag will export the ZM_PID constant which details the location of the zm.pid file
The :config tag will export all configuration from the database as well as any from the zm.conf file
The :all tag will export all above symbols.

=head1 SEE ALSO

http://www.zoneminder.com

=head1 AUTHOR

Philip Coombes, E<lt>philip.coombes@zoneminder.comE<gt>

=head1 COPYRIGHT AND LICENSE

Copyright (C) 2001-2008 Philip Coombes

This library is free software; you can redistribute it and/or modify
it under the same terms as Perl itself, either Perl version 5.8.3 or,
at your option, any later version of Perl 5 you may have available.


=cut

TechGuy
Posts: 47
Joined: Sun Oct 18, 2009 8:16 pm

Post by TechGuy » Wed Nov 04, 2009 6:32 pm

DBI connect('database=zm;host=localhost','zmuser',...) failed: Unknown database 'zm' at /usr/share/perl5/ZoneMinder/Config.pm line 89
You have an issue with the MYSQL database:

1. is MySQL listening on 127.0.0.1 or what ever address you assigned to "localhost"? Perhaps you set up Mysql to listen on your ethernet IP address instead.

2. Can you log into MySQL? perhaps your MySQL config does permit you to login using root or whatever account your running the ZM install from.

Fitch
Posts: 105
Joined: Sat Oct 31, 2009 4:01 pm
Location: Hartlepool, U.K.
Contact:

Post by Fitch » Wed Nov 04, 2009 8:43 pm

Aha!
You have something there, Mysql keeps saying no password.
How do I put a password in?
Should it be asking me?

Fitch
Posts: 105
Joined: Sat Oct 31, 2009 4:01 pm
Location: Hartlepool, U.K.
Contact:

Post by Fitch » Thu Nov 05, 2009 2:48 pm

I get no such file or directory when I type in ./configure --help
I cannot get into mysql in root or my own (brafferton) account.
I just says Access denied for user 'brafferton'@'localhost' (using password YES).
I'm a bit stuffed really...

TechGuy
Posts: 47
Joined: Sun Oct 18, 2009 8:16 pm

Post by TechGuy » Thu Nov 05, 2009 8:31 pm

Fitch wrote:I get no such file or directory when I type in ./configure --help
I cannot get into mysql in root or my own (brafferton) account.
I just says Access denied for user 'brafferton'@'localhost' (using password YES).
I'm a bit stuffed really...
It shouldn't need a password if your building/installing as root. I believe you need to add statement to your /etc/mysql/mysqlaccess.conf file to permit 'root' to login to mysql without a password prompt.

you should have an entry like below in mysqlaccess.conf

# --------------------------#
# Settings for Command-line #
# ------------------------- #
if ($CMD) {
$Param{'superuser'} = 'root';
$Param{'rhost'} = 'localhost';
$Param{'spassword'} = '';
$Param{'brief'} = 1;

Fitch
Posts: 105
Joined: Sat Oct 31, 2009 4:01 pm
Location: Hartlepool, U.K.
Contact:

Post by Fitch » Fri Nov 06, 2009 11:46 am

I downloaded Zoneminder 1.23.3 onto the hard drive as 1.24 has no chance of building

There is no "mysqlaccess.conf" file,
but there is a "my.cnf" so I've added the lines to that file, thanks

It got a little further, and then it stopped because I didn't have gnutls/openssl.h

Apparently, I needed a PHP serialisation module, so I went off and got one.
I downloaded and compiled that, but obviously it's looking for another openssl.h 'cos it keeps stopping at the same place:
configure: error: zm requires gnutls/openssl.h - use ZM_SSL_LIB option to select openssl instead

So going around in circles I (just for a laugh) did apt-get install zoneminder and got about 6 or 7 lines before:

ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
dpkg: error processing zoneminder (--configure):
subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
zoneminder
E: Sub-process /usr/bin/dpkg returned an error code (1)

came up, which is about 200 lines less than previous attempts at ZM 1.24, so its one step forward and two steps back....

Now what?

I've managed to get Windows XP up and running again on the other partition, so at night I can switch the cameras back on, otherwise I would have ditched this days ago.

Fitch
Posts: 105
Joined: Sat Oct 31, 2009 4:01 pm
Location: Hartlepool, U.K.
Contact:

Post by Fitch » Fri Nov 06, 2009 6:44 pm

Now I've had a look in directory /var/run/mysqld/ and there's not a sausage in there!
Empty, Nada, Nichts.

Probably there should be a file called "mysqld.sock" in there, just guessing like.
Has anyone got one that I can borrow?

Post Reply

Who is online

Users browsing this forum: No registered users and 17 guests