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

Support and queries relating to all previous versions of ZoneMinder
Locked
paguira
Posts: 7
Joined: Tue Jul 08, 2008 3:25 pm

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

Post 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
User avatar
cordel
Posts: 5210
Joined: Fri Mar 05, 2004 4:47 pm
Location: /USA/Washington/Seattle

Post by cordel »

Recompile ffmpeg with the swscale option.
bnaef
Posts: 12
Joined: Sun May 29, 2005 6:20 pm

Post 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.
bnaef
Posts: 12
Joined: Sun May 29, 2005 6:20 pm

Post 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.
andrewy
Posts: 1
Joined: Tue Sep 02, 2008 1:56 pm

Post by andrewy »

As a note, if running on a 64 bit system, you may need to substitute /lib64 for /lib.
bnaef
Posts: 12
Joined: Sun May 29, 2005 6:20 pm

Post 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
Locked