Page 1 of 1

/usr/local/bin/zmfix: error while loading shared libraries:

Posted: Sat Jul 12, 2008 7:09 am
by paguira
I have the following error when launching ZoneMinder.
/usr/local/bin/zmfix: error while loading shared libraries: libswscale.so.0: cannot open shared object file: No such file or directory
You do not have a solution for me?
--
Centos 5.1 ZoneMinder-1.23.3

Posted: Sat Jul 12, 2008 7:30 am
by cordel
Recompile ffmpeg with the swscale option.

Posted: Fri Aug 08, 2008 11:44 pm
by bnaef
I have the same problem. I did config ffmpeg with the swscale option and the missing file is located in /usr/local/lib//usr/local/lib/libswscale.so.0. It seems that zmfix does not find the file in that location. Where does zmfix expect to find /usr/local/lib/libswscale.so.0?

There might be a related issue. Building ffmpeg from svn/ sources puts the ffmpeg files into dirs below /usr/local/include/ffmpeg/*. However src/zm_mpeg.h is looking for ffmpeg files in #include <ffmpeg/avformat.h>. I tried to run zm ./configure --with-ffmpeg=/usr/local/include/ffmpeg - that did not work. I ended up changing the path in zm_mpeg.h from ffmpeg/avformat.h to libavformat/avformat.h.

Posted: Sat Aug 09, 2008 4:10 pm
by bnaef
Solution to the above question/ problem:
zmfix is looking for the ffmpeg libs in /lib. cd /lib and then ln -s /usr/local/lib/libswscale.so.0 . (do the same for libavformat.so.52, libavcodec.so.51 and libavutil.so.49.
run zmfix and it should work.

Posted: Tue Sep 02, 2008 1:58 pm
by andrewy
As a note, if running on a 64 bit system, you may need to substitute /lib64 for /lib.

Posted: Thu Sep 04, 2008 5:57 pm
by bnaef
if you built ffmpeg from scratch, ffmpeg puts it's libs into /usr/local/lib. however, ZM is looking for those libs in /usr/lib. Hence you may need to create softlinks from /usr/local/lib/libav... to /usr/lib.

there is another related issue:
ffmpeg puts it's header files into /usr/local/includes/libav../headerfile. however, zm is coded to look for the header files in /usr/local/includes/ffmpeg/headerfiles (check the file zm dir/src/zm_mpeg.h).

hence you may need to modify the zm_mpeg.h file, so that zm find the proper header files during make.

Beat