ERROR 1054 (42S22) at line 5: Unknown column 'Query_json' in 'where clause'

Previous development branch now released as 1.36
Locked
TheRoth
Posts: 28
Joined: Tue May 05, 2020 3:57 am

ERROR 1054 (42S22) at line 5: Unknown column 'Query_json' in 'where clause'

Post by TheRoth »

Hi,

i update yesterday ZoneMinder and i have this problem... i don't know what can i do...

Thanks :)

Code: Select all

perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
	LANGUAGE = (unset),
	LC_ALL = (unset),
	LC_CTYPE = "UTF-8",
	LANG = "fr_FR.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to a fallback locale ("fr_FR.UTF-8").
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: Aucun fichier ou dossier de ce type
Setting up zoneminder (1.35.15~20201209.45-buster) ...
detected systemd
Detected db service is mariadb.service
Checking for db
Db exists.
Updating permissions for user zmuser@localhost

Initiating database upgrade to version 1.35.15 from version 1.35.14

Upgrading database to version 1.35.15
Loading config from DB 219 entries
Saving config to DB 219 entries
Upgrading DB to 1.35.15 from 1.35.14
ERROR 1054 (42S22) at line 5: Unknown column 'Query_json' in 'where clause'
Output: 
Command 'mysql -hlocalhost -uzmuser -p'zmpass' zm < /usr/share/zoneminder/db/zm_update-1.35.15.sql' exited with status: 1

Freshening configuration in database
Migratings passwords, if any...
Loading config from DB 219 entries
Saving config to DB 219 entries
Done Updating
Job for zoneminder.service failed because the control process exited with error code.
See "systemctl status zoneminder.service" and "journalctl -xe" for details.
Job for zoneminder.service failed because the control process exited with error code.
See "systemctl status zoneminder.service" and "journalctl -xe" for details.
invoke-rc.d: initscript zoneminder, action "start" failed.
● zoneminder.service - ZoneMinder CCTV recording and surveillance system
     Loaded: loaded (/lib/systemd/system/zoneminder.service; enabled; vendor preset: enabled)
     Active: activating (auto-restart) (Result: exit-code) since Wed 2020-12-09 08:33:10 CET; 14ms ago
    Process: 3411 ExecStart=/usr/bin/zmpkg.pl start (code=exited, status=255/EXCEPTION)
dpkg: error processing package zoneminder (--configure):
 installed zoneminder package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
 zoneminder
E: Sub-process /usr/bin/dpkg returned an error code (1)
Magic919
Posts: 1381
Joined: Wed Sep 18, 2013 6:56 am

Re: ERROR 1054 (42S22) at line 5: Unknown column 'Query_json' in 'where clause'

Post by Magic919 »

Does it exist in your DB? If not, find where it would have been created and make it so.
-
TheRoth
Posts: 28
Joined: Tue May 05, 2020 3:57 am

Re: ERROR 1054 (42S22) at line 5: Unknown column 'Query_json' in 'where clause'

Post by TheRoth »

i remove zone minder... and i install again... But new error :|

Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
zoneminder : Depends: libdbd-mysql-perl but it is not going to be installed
Depends: libdevice-serialport-perl but it is not going to be installed
Depends: libsys-mmap-perl but it is not going to be installed
Depends: libdatetime-perl but it is not going to be installed
Depends: libsoap-wsdl-perl but it is not going to be installed
Depends: libio-socket-multicast-perl but it is not going to be installed
Depends: libsys-cpu-perl but it is not going to be installed
Depends: libsys-meminfo-perl but it is not going to be installed
Depends: libcrypt-eksblowfish-perl but it is not going to be installed
Depends: libdata-entropy-perl but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
TheRoth
Posts: 28
Joined: Tue May 05, 2020 3:57 am

Re: ERROR 1054 (42S22) at line 5: Unknown column 'Query_json' in 'where clause'

Post by TheRoth »

Magic919 wrote: Wed Dec 09, 2020 3:04 pm Does it exist in your DB? If not, find where it would have been created and make it so.
i don't know... but my ZoneMinder was clean 2 years ago and i do nothing....
Magic919
Posts: 1381
Joined: Wed Sep 18, 2013 6:56 am

Re: ERROR 1054 (42S22) at line 5: Unknown column 'Query_json' in 'where clause'

Post by Magic919 »

Sounds like you need to stay away from 1.35.x version and install the stable 1.34 instead.
-
User avatar
iconnor
Posts: 2881
Joined: Fri Oct 29, 2010 1:43 am
Location: Toronto
Contact:

Re: ERROR 1054 (42S22) at line 5: Unknown column 'Query_json' in 'where clause'

Post by iconnor »

Sounds like the db is not updated correctly. That change was in 1.33.14

mysql -u zmuser -p zm < /usr/share/zoneminder/db/zm_update-1.33.14.sql


Maybe try

sudo zmupdate.pl
Puydomois
Posts: 1
Joined: Mon Jan 04, 2021 1:12 pm

Re: ERROR 1054 (42S22) at line 5: Unknown column 'Query_json' in 'where clause'

Post by Puydomois »

Hello,
I had the same problem :Re: ERROR 1054 (42S22) at line 5: Unknown column 'Query_json' in 'where clause'.
I found an error in database table : "Filters"
The column is named Query.
I rename it Query_json and all is now working .
If this can help you
Cordialement (Français)
Locked