Thursday, January 5, 2012

pdf2swf: cannot open shared object file. No such file or directory

Problem:
After compiling swftools on my linux box, I did some other tasks and then went to convert a pdf to swf file. When running the conversion, I was met with the following error:

/user/local/bin/pdf2swf: error while loading shared libraries: libjpeg.so.8: cannot open shared object file: No such file or directory

Solution:
This is due to where the libjpeg files are and where pdf2swf is looking for them. Looking at their documentation for installation, I found this:

Furthermore, a new installation of jpeglib (the following assumes it's in /usr/local/lib) often requires doing a:

 ranlib /usr/local/lib/libjpeg.a
 ldconfig /usr/local/lib

I executed these lines and everything went back to running smoothly. 

1 comment:

Zander said...

Cool! It helped me to ivercome this problem:


make[1]: Entering directory `/home/admin-vm8/FFMPEG/swftools-0.9.1/lib'
gcc -c -DHAVE_CONFIG_H -I/usr/include/freetype2 -I/usr/include/fontconfig -fPIC -Wimplicit -Wreturn-type -Wno-write-strings -Wformat -O -fomit-frame-pointer modules/swfaction.c -o modules/swfaction.o
In file included from modules/.././bitio.h:23,
from modules/../rfxswf.h:37,
from modules/swfaction.c:24:
modules/.././types.h:39:2: error: #error "no way to define 64 bit integer"
modules/.././types.h:42:2: error: #error "don't know how to define 32 bit integer"
modules/.././types.h:45:2: error: #error "don't know how to define 16 bit integer"
modules/.././types.h:48:2: error: #error "don't know how to define 8 bit integer"
make[1]: *** [modules/swfaction.o] Error 1
make[1]: Leaving directory `/home/admin-vm8/FFMPEG/swftools-0.9.1/lib'
make: *** [all] Error 2