Page 1 of 1

Install Zoneminder under Ubuntu 11.04 error 2002 (HY000)

Posted: Fri Feb 03, 2012 10:28 am
by Schuhkasten
Hello

does anyone know how to install Zoneminder under Ubuntu 11.04?

I had it working but after installing further software suddenly the CAM picture was simple gone.

I tried to start and stop mysql but both did not work
Now trying to reinstall:

Code: Select all

Setting up zoneminder (1.24.2-2build3) ...
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)
joern@ubuntu:~$ sudo apt-get install zoneminder
Reading package lists... Done
Building dependency tree       
Reading state information... Done
zoneminder is already the newest version.
The following packages were automatically installed and are no longer required:
  linux-headers-2.6.32-33-generic linux-headers-2.6.32-33
Use 'apt-get autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
1 not fully installed or removed.
After this operation, 0B of additional disk space will be used.
Setting up zoneminder (1.24.2-2build3) ...
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)

Re: Install Zoneminder under Ubuntu 11.04 error 2002 (HY000)

Posted: Fri Feb 03, 2012 1:24 pm
by PacoLM
Maybe the database got corrupted, install phpmyadmin and check your tables. If not, recreate the tables before reinstalling everything.

Re: Install Zoneminder under Ubuntu 11.04 error 2002 (HY000)

Posted: Fri Feb 03, 2012 6:40 pm
by Schuhkasten
could you describe that in detail?

Re: Install Zoneminder under Ubuntu 11.04 error 2002 (HY000)

Posted: Fri Feb 03, 2012 6:42 pm
by Schuhkasten
this happened during installing :

Code: Select all

joern@ubuntu:/etc/init.d$ sudo apt-get install phpmyadmin
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-33-generic linux-headers-2.6.32-33
Use 'apt-get autoremove' to remove them.
The following extra packages will be installed:
  dbconfig-common libjs-mootools libmcrypt4 libt1-5 php5-gd php5-mcrypt
Suggested packages:
  libmcrypt-dev mcrypt
The following NEW packages will be installed:
  dbconfig-common libjs-mootools libmcrypt4 libt1-5 php5-gd php5-mcrypt phpmyadmin
0 upgraded, 7 newly installed, 0 to remove and 1 not upgraded.
1 not fully installed or removed.
Need to get 5,300kB of archives.
After this operation, 21.2MB of additional disk space will be used.
Do you want to continue [Y/n]? y
Get:1 http://de.archive.ubuntu.com/ubuntu/ lucid/main dbconfig-common 1.8.44ubuntu1 [474kB]
Get:2 http://de.archive.ubuntu.com/ubuntu/ lucid/universe libjs-mootools 1.2.4.0~debian1-1 [248kB]
Get:3 http://de.archive.ubuntu.com/ubuntu/ lucid/universe libmcrypt4 2.5.8-3.1 [76.1kB]
Get:4 http://de.archive.ubuntu.com/ubuntu/ lucid-updates/main libt1-5 5.1.2-3ubuntu0.10.04.2 [156kB]
Get:5 http://de.archive.ubuntu.com/ubuntu/ lucid-updates/main php5-gd 5.3.2-1ubuntu4.11 [34.9kB]
Get:6 http://de.archive.ubuntu.com/ubuntu/ lucid/universe php5-mcrypt 5.3.2-0ubuntu1 [15.2kB]
Get:7 http://de.archive.ubuntu.com/ubuntu/ lucid-updates/universe phpmyadmin 4:3.3.2-1ubuntu1 [4,296kB]
Fetched 5,300kB in 4s (1,268kB/s)     
Preconfiguring packages ...
Selecting previously deselected package dbconfig-common.
(Reading database ... 160779 files and directories currently installed.)
Unpacking dbconfig-common (from .../dbconfig-common_1.8.44ubuntu1_all.deb) ...
Selecting previously deselected package libjs-mootools.
Unpacking libjs-mootools (from .../libjs-mootools_1.2.4.0~debian1-1_all.deb) ...
Selecting previously deselected package libmcrypt4.
Unpacking libmcrypt4 (from .../libmcrypt4_2.5.8-3.1_i386.deb) ...
Selecting previously deselected package libt1-5.
Unpacking libt1-5 (from .../libt1-5_5.1.2-3ubuntu0.10.04.2_i386.deb) ...
Selecting previously deselected package php5-gd.
Unpacking php5-gd (from .../php5-gd_5.3.2-1ubuntu4.11_i386.deb) ...
Selecting previously deselected package php5-mcrypt.
Unpacking php5-mcrypt (from .../php5-mcrypt_5.3.2-0ubuntu1_i386.deb) ...
Selecting previously deselected package phpmyadmin.
Unpacking phpmyadmin (from .../phpmyadmin_4%3a3.3.2-1ubuntu1_all.deb) ...
Processing triggers for man-db ...
Processing triggers for libapache2-mod-php5 ...
 * Reloading web server config apache2                                                                                           [Fri Feb 03 19:41:09 2012] [warn] The Alias directive in /etc/apache2/sites-enabled/zoneminder at line 1 will probably never match because it overlaps an earlier Alias.
apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName
                                                                                                                          [ OK ]
Processing triggers for doc-base ...
Processing 1 added doc-base file(s)...
Registering documents with scrollkeeper...
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
Setting up dbconfig-common (1.8.44ubuntu1) ...

Creating config file /etc/dbconfig-common/config with new version

Setting up libjs-mootools (1.2.4.0~debian1-1) ...
Setting up libmcrypt4 (2.5.8-3.1) ...

Setting up libt1-5 (5.1.2-3ubuntu0.10.04.2) ...

Setting up php5-gd (5.3.2-1ubuntu4.11) ...
Setting up php5-mcrypt (5.3.2-0ubuntu1) ...
Setting up phpmyadmin (4:3.3.2-1ubuntu1) ...
dbconfig-common: writing config to /etc/dbconfig-common/phpmyadmin.conf

Creating config file /etc/dbconfig-common/phpmyadmin.conf with new version

Creating config file /etc/phpmyadmin/config-db.php with new version
granting access to database phpmyadmin for phpmyadmin@localhost: success.
verifying access for phpmyadmin@localhost: success.
creating database phpmyadmin: success.
verifying database phpmyadmin exists: success.
populating database via sql...  done.
dbconfig-common: flushing administrative password
 * Reloading web server config apache2                                                                                           [Fri Feb 03 19:41:33 2012] [warn] The Alias directive in /etc/apache2/sites-enabled/zoneminder at line 1 will probably never match because it overlaps an earlier Alias.
apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName
                                                                                                                          [ OK ]

Processing triggers for libc-bin ...
ldconfig deferred processing now taking place
Errors were encountered while processing:
 zoneminder
E: Sub-process /usr/bin/dpkg returned an error code (1)

Re: Install Zoneminder under Ubuntu 11.04 error 2002 (HY000)

Posted: Fri Feb 03, 2012 8:15 pm
by PacoLM
Starting ZoneMinder: DBI connect('database=zm;host=localhost','zmuser',...) failed: Unknown database 'zm' at /usr/share/perl5/ZoneMinder/Config.pm line 89
This is a symptom of no database created or corrupted. Read the point 10 of this guide:
http://www.zoneminder.com/wiki/index.ph ... rom_source

Regards,

PacoLM

Re: Install Zoneminder under Ubuntu 11.04 error 2002 (HY000)

Posted: Sat Feb 04, 2012 1:07 pm
by Schuhkasten
Hy

thanks, I tried step 10 and installed also all items before but when I tried to load any sql database from /db it causes a error...

Code: Select all

mysql -u root -p < zm_create.sql.in 
ERROR 1064 (42000) at line 29: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '@ZM_MYSQL_ENGINE@' at line 16

or

mysql -u root -p < zm_update-1.24.4.sql 
ERROR 1046 (3D000) at line 10: No database selected
did I misunderstood that?

Re: Install Zoneminder under Ubuntu 11.04 error 2002 (HY000)

Posted: Sat Feb 04, 2012 1:50 pm
by Schuhkasten
this worked thx!

sudo mysql -u root -p < /usr/share/zoneminder/db/zm_create.sql