PeterHoward wrote:
I can't remember the full detail, so we'll have to work through it. Do you have anything with "zoneminder" in the name in /usr/share/debhelper/autoscripts"?
OK, now that I have that bit sorted out in my brain, ignore that location. The correct location is /var/lib/dpkg/info/ You need to gut /var/lib/dpkg/info/zoneminder.postinst. Adding something like
I actually went looking for the MySQL syntax for "drop index if exists" to avoid the problem for others, but it doesn't seem that MySQL supports conditionally dropping a column or index with a simple "if exists" extension to the command. Instead it would require a script/procedures that first queries information_schema.statistics to look for the presence of the index and executes the drop within an IF block. I'll leave it up to the powers-that-be to decide whether it's worth that effort.
Zoneminder's make file was expecting .h files in /usr/local/include/fmpeg. My ffmpeg install didn't create a ffmpeg folder under /usr/local/include, instead it created folders like libavdevice, liavutil, libswscale, libavcodec and libvformat. I think there might have been recent changes to ffmpeg and now they are out of sync with Zoneminder's make file.
Checking out the SVN revision of that Zoneminder 1.23.3 was built with would probably fix the problem but I didn't know the corret revision. Instead I did the following:
Starting ZoneMinder: /usr/local/bin/zmfix: error while loading shared libraries: libswscale.so.0: cannot open shared object file: No such file or directory
/usr/local/bin/zmfix: error while loading shared libraries: libswscale.so.0: cannot open shared object file: No such file or directory
failure
When you called ./configure with the Zoneminder src did you have the option --with-ffmpeg=/opt/? If you didn't that the build won't work.
If your did have the --with-ffmpeg=/opt/ option set, then look in the opt directory for the ffmpeg files. There should be a 'lib' directory that has the .so files zoneminder is looking for. There should be a 'bin' directory with the ffmpeg executable. There should also be an include directory. Your include directory will either have a ffmpeg directory or a libavformat and libswscale directory. If it's a ffmpeg directory under /opt/incudle, then you should be okay. Has libavformate and libswscale instead then do the following:
Starting ZoneMinder: /usr/local/bin/zmfix: error while loading shared libraries: libswscale.so.0: cannot open shared object file: No such file or directory
/usr/local/bin/zmfix: error while loading shared libraries: libswscale.so.0: cannot open shared object file: No such file or directory
failure
I'm guessing that libwscale.so.0 is sitting in a directory something like /opt/lib . That's not on the default library path, which is why the system can't find them. Try the following and see what happens: