[mapserver-users] Problem with libjpeg

Andy Colson andy at squeakycode.net
Mon Oct 19 09:12:24 EDT 2009


Alan Hale wrote:
> Hi
> 
> I had successfully compiled and installed Mapserver recently but when I 
> tried to run the Itasca demo I realised I had ommitted to configure with 
> gdal. So I untarred fresh source files and ran a new configure, this 
> time with gdal, thus:
> 
> ./configure --with-ogr=/usr/local/bin/gdal-config 
> --with-gdal=/usr/local/bin/gdal-config --with-httpd=/usr/sbin/httpd 
> --with-wfsclient --with-wmsclient --enable-debug 
> --with-curl-config=/usr/local/bin/curl-config --with-proj=/usr/local 
> --with-tiff --with-gd=/usr/local/ --with-jpeg 
> --with-freetype=/usr/local/lib/ --with-threads --with-php=/usr/include/php
> 
> The configure seemed to go OK but after doing make I tried to rum 
> mapserv from the command line (./mapserv) and got the error:
> 
> error while loading shared libraries: libjpeg.so.7: cannot open shared 
> object file: No such file or directory
> 
> When I check config.log it says "using libjpeg from system libs."
> 
> I then ran config again giving a path to where I know libjpeg.so resides 
> I got "Could not find jpeglib.h or libjpeg.a/libjpeg.so/libjpeg.dylib in 
> /usr/local/lib/."  .... "using libjpeg from system libs."
> 
> Could someone kindly explain what is going on here? Many thanks.
> 
> Alan
> 

First you need to find libjpeg.  one way is:

ldconfig -v|grep jpeg

if not there, try a few common places:

ls /usr/lib/libjpeg*
ls /usr/local/lib/libjpeg*

or if you have locate/slocate then try:
slocate libjpeg.so.7

Second, if it seemed to compile ok, then it found the .h files (which are probably in /usr/include or /usr/local/include), but when you run it, its looking for libjpeg.so, and specifically, libjpeg.so.7 which is probably a symlink.


My guess is the lib is in /usr/local/lib, but you dont have that lib in /etc/ld.so.conf.
Probably just need to add that path to the file and then run ldconfig once.

-Andy


More information about the mapserver-users mailing list