Page 1 of 1
1.24.3 and Ubuntu 11.04
Posted: Sun May 29, 2011 8:47 pm
by PacoLM
Hi,
Installed zoneminder using the help provided in this topic
http://www.zoneminder.com/forums/viewto ... 21&t=17676 and this one of the wiki
http://www.zoneminder.com/wiki/index.ph ... _Cambozola
After sending the command service zm start, I got this error:
Code: Select all
root@ubuntu:/usr/src/zm# service zm start
Starting ZoneMinder: /usr/local/bin/zmfix: relocation error: /usr/local/lib/libavcore.so.0: symbol av_expr_parse_and_eval, version LIBAVUTIL_50 not defined in file libavutil.so.50 with link time reference
failure
In the logs the output is this:
Code: Select all
May 29 22:39:59 ubuntu zmpkg[22568]: INF [Command: start]
May 29 22:40:00 ubuntu zmpkg[22568]: ERR [Unable to run "sudo -u www-data /usr/local/bin/zmfix", output is ""]
Code: Select all
Starting ZoneMinder: Can't open config file '/usr/local/etc/zm.conf': Permiso denegado at /usr/local/share/perl/5.10.1/ZoneMinder/Config.pm line 100
BEGIN failed--compilation aborted at /usr/local/share/perl/5.10.1/ZoneMinder/Config.pm line 100.
Compilation failed in require at /usr/local/share/perl/5.10.1/ZoneMinder.pm line 33.
BEGIN failed--compilation aborted at /usr/local/share/perl/5.10.1/ZoneMinder.pm line 33.
Compilation failed in require at /usr/local/bin/zmpkg.pl line 46.
BEGIN failed--compilation aborted at /usr/local/bin/zmpkg.pl line 46.
failure
Any clue?. Seems a permissions problem, but I could not find what is producing the error.
Thanks in advance,
PacoLM
Re: 1.24.3 and Ubuntu 11.04
Posted: Sun May 29, 2011 9:04 pm
by graphicw
It appears you have wrong version of ffmpeg. Make sure you build ffmpeg from git rather than subversion. The instructions I give are not 100% complete either, I do not have any instructions for database creation as I assumed the person I tried to help already had their database set up. I will write a complete set of instructions when I have a little time. The instructions in the wiki (Ubuntu Server 11.04 64-bit with ZoneMinder 1.24.x from SVN, FFmpeg, libjpeg-turbo, Webmin, Cambozola) need to be edited as part of the steps are no longer necessary with the updates of zoneminder and the some of the library paths have changed.
These steps are no longer necessary.
Code: Select all
cd /usr/src/zm/src && nano zm_utils.cpp
#Insert the following line after other includes,then Ctrl-o to save, Ctrl-x to exit nano
#include <cstdio>
###Edit files below, or ZoneMinder will not compile (depricated as of May 13th, look at update below.)
#
###nano src/zm_ffmpeg_camera.cpp # change “CODEC_TYPE_VIDEO” to “AVMEDIA_TYPE_VIDEO”
###nano src/zm_mpeg.cpp # change “PKT_FLAG_KEY” to “AV_PKT_FLAG_KEY”
###nano src/zm_mpeg.cpp # change “CODEC_TYPE_VIDEO” to “AVMEDIA_TYPE_VIDEO”
###nano src/zm_remote_camera_rtsp.cpp # change as before
###nano src/zm_rtsp.cpp # change as before
###nano src/zm_sdp.cpp # change all CODEC_TYPE_ to AVMEDIA_TYPE_
###nano src/zm_sdp.h # change “enum CodecType” to “enum AVMediaType”
#UPDATE May 13th, thanks to Nogero (http://www.zoneminder.com/forums/viewtopic.php?f=21&t=17621)
### script to edit cpp files using sed so they compile on Ubuntu 11.04
sed 's/CODEC_TYPE_VIDEO/AVMEDIA_TYPE_VIDEO/g' zm_ffmpeg_camera.cpp > /tmp/ptmp.cpp ; mv /tmp/ptmp.cpp zm_ffmpeg_camera.cpp
sed 's/PKT_FLAG_KEY/AV_PKT_FLAG_KEY/g' zm_mpeg.cpp > /tmp/ptmp.cpp ; mv /tmp/ptmp.cpp zm_mpeg.cpp
sed 's/CODEC_TYPE_VIDEO/AVMEDIA_TYPE_VIDEO/g' zm_mpeg.cpp > /tmp/ptmp.cpp ; mv /tmp/ptmp.cpp zm_mpeg.cpp
# zm_remote_camera_rtsp.cpp # change as before
sed 's/PKT_FLAG_KEY/AV_PKT_FLAG_KEY/g' zm_remote_camera_rtsp.cpp > /tmp/ptmp.cpp ; mv /tmp/ptmp.cpp zm_remote_camera_rtsp.cpp
sed 's/CODEC_TYPE_VIDEO/AVMEDIA_TYPE_VIDEO/g' zm_remote_camera_rtsp.cpp > /tmp/ptmp.cpp ; mv /tmp/ptmp.cpp zm_remote_camera_rtsp.cpp
# zm_rtsp.cpp # change as before
sed 's/PKT_FLAG_KEY/AV_PKT_FLAG_KEY/g' zm_rtsp.cpp > /tmp/ptmp.cpp ; mv /tmp/ptmp.cpp zm_rtsp.cpp
sed 's/CODEC_TYPE_VIDEO/AVMEDIA_TYPE_VIDEO/g' zm_rtsp.cpp > /tmp/ptmp.cpp ; mv /tmp/ptmp.cpp zm_rtsp.cpp
sed 's/CODEC_TYPE_/AVMEDIA_TYPE_/g' zm_sdp.cpp > /tmp/ptmp.cpp ; mv /tmp/ptmp.cpp zm_sdp.cpp
sed 's/enum CodecType/enum AVMediaType/g' zm_sdp.h > /tmp/ptmp.cpp ; mv /tmp/ptmp.cpp zm_sdp.h
# -------------- end of script -----------------
These library paths have changed if you are building zoneminder from scratch:
Code: Select all
ln -s /opt/libjpeg-turbo/lib/libjpeg.a /usr/lib/libjpeg.a && \
ln -s /opt/libjpeg-turbo/include/jconfig.h /usr/include/jconfig.h && \
ln -s /opt/libjpeg-turbo/include/jerror.h /usr/include/jerror.h && \
ln -s /opt/libjpeg-turbo/include/jmorecfg.h /usr/include/jmorecfg.h && \
ln -s /opt/libjpeg-turbo/include/jpeglib.h /usr/include/jpeglib.h
#######################
#Configure Lib Paths#
#######################
echo "/opt/libjpeg-turbo/lib" > /etc/ld.so.conf.d/libjpeg-turbo.conf && \
echo "/usr/local/lib" > /etc/ld.so.conf.d/ffmpeg.conf && \
echo "LD_LIBRARY_PATH=/usr/local/lib:/opt/libjpeg-turbo/lib:$LD_LIBRARY_PATH" >> /etc/bash.bashrc && \
echo "export LD_LIBRARY_PATH" >> /etc/bash.bashrc
I have the correct paths in the help instructions.
Re: 1.24.3 and Ubuntu 11.04
Posted: Tue May 31, 2011 6:12 pm
by asturgeon
Check out this thread:
http://www.zoneminder.com/forums/viewto ... 21&t=17665
This script will install ZM and ffmpeg on recent ubuntus.
Re: 1.24.3 and Ubuntu 11.04
Posted: Tue May 31, 2011 8:49 pm
by PacoLM
Hi asturgeon,
I have ran the script and after a successful installation. I have modified the 1.24.3 for the latest 1.24.4 version in the script, I still get this error:
Code: Select all
pako@ubuntu:/usr/local/bin$ service zoneminder start
Starting ZoneMinder: zmfix: relocation error: /usr/local/lib/libavcore.so.0: symbol av_expr_parse_and_eval, version LIBAVUTIL_50 not defined in file libavutil.so.50 with link time reference
Can't open config file '/usr/local/etc/zm.conf': Permiso denegado at /usr/local/share/perl/5.10.1/ZoneMinder/Config.pm line 100
BEGIN failed--compilation aborted at /usr/local/share/perl/5.10.1/ZoneMinder/Config.pm line 100.
Compilation failed in require at /usr/local/share/perl/5.10.1/ZoneMinder.pm line 33.
BEGIN failed--compilation aborted at /usr/local/share/perl/5.10.1/ZoneMinder.pm line 33.
Compilation failed in require at /usr/local/bin/zmpkg.pl line 46.
BEGIN failed--compilation aborted at /usr/local/bin/zmpkg.pl line 46.
failure
This is the log:
Code: Select all
May 31 22:37:22 ubuntu zmpkg[4071]: INF [Command: start]
May 31 22:37:22 ubuntu zmpkg[4071]: ERR [Unable to run "/usr/local/bin/zmfix", output is ""]
I have changed the location of the ffmpeg encoder (it was different than the default zm setting), but still the same error. If I run the service as sudo:
Code: Select all
pako@ubuntu:/usr/bin$ sudo service zoneminder start
Starting ZoneMinder: zmfix: relocation error: /usr/local/lib/libavcore.so.0: symbol av_expr_parse_and_eval, version LIBAVUTIL_50 not defined in file libavutil.so.50 with link time reference
/usr/local/bin/zmfix: relocation error: /usr/local/lib/libavcore.so.0: symbol av_expr_parse_and_eval, version LIBAVUTIL_50 not defined in file libavutil.so.50 with link time reference
failure
Any clue?.
Thanks in advance,
PacoLM
Re: 1.24.3 and Ubuntu 11.04
Posted: Tue May 31, 2011 11:23 pm
by asturgeon
The problem isn't that ZM can't find ffmpeg, it's that it was built expecting a different version that is installed.
You need to start from scratch, and either run the script i posted, or follow the other posts from other users here (either will work). The *most important* step is to remove all ffmpeg packages, along with any of the libav* libraries from /usr/local/lib, or wherever you have installed them. This is crucial.
Once you remove ffmpeg and all of it's libraries, you can recompile using the oldabi branch of ffmpeg (since trunk appears to break some things), and then recompile ZM pointing to the correct location of ffmpeg. This will ensure you are building ZM against the right version of ffmpeg.
Re: 1.24.3 and Ubuntu 11.04
Posted: Wed Jun 01, 2011 6:32 am
by PacoLM
Thanks, I'll give it a try when I arrive home this afternoon!.
Re: 1.24.3 and Ubuntu 11.04
Posted: Thu Jun 02, 2011 8:58 am
by erict35
Hi
I follow this guide :
http://www.zoneminder.com/wiki/index.ph ... _Cambozola
I have tried to compile the 1.24.4 version of ZM on a Ubuntu server 11.04 64 bits. I have un problem with configure telling me that jpeglib.h is not present. In facts it's in the /usr/include directory.
I precise that I haven't modified the source code of ZM as indicated in the text.
Any idea ?
Best Regards
Eric
Re: 1.24.3 and Ubuntu 11.04
Posted: Thu Jun 02, 2011 2:19 pm
by zoneminder
There should be something in config.log indicating why it thought it was missing.