[mapserver-dev] ERROR WORKING WITH MAPSERVER

Stephen Woodbridge woodbri at swoodbridge.com
Sat Mar 2 08:36:35 PST 2013


On 3/2/2013 11:17 AM, reactorh wrote:
> Any one could give me a hand on this.....
>
> Thx

So you got:

 > I compilded Mapserver and when i try to used it i got this:
 >  PHP Warning:  PHP Startup: Unable to load dynamic library
 > 
'/usr/local/lib/php/extensions/no-debug-non-zts-20090626/php_mapscript.so' -
 > libmapserver-6.2.0.so: cannot open shared object file: No such file or
 > directory in Unknown on line 0

and ldd says this is the file it is looking for:

/usr/local/lib/libmapserver-6.2.0.so

So does this file exist?

ls -l /usr/local/lib/libmapserver-6.2.0.so

It need permission so that PHP can access it. It should be owned by root.

So on my system I have stuff like:

-rwxr-xr-x 1 root root    5942968 2012-07-02 09:36 libmapserver-6.1-dev.so
-rwxr-xr-x 1 root root    5934502 2012-07-14 17:10 
libmapserver-6.2.0-beta1.so
-rwxr-xr-x 1 root root    5933786 2012-08-01 10:40 
libmapserver-6.2.0-beta2.so
-rwxr-xr-x 1 root root    5947268 2012-11-12 10:14 libmapserver-6.3-dev.so
-rwxr-xr-x 1 root root       2066 2012-11-12 10:14 libmapserver.la
lrwxrwxrwx 1 root root         23 2012-11-12 10:14 libmapserver.so -> 
libmapserver-6.3-dev.so

Notice that libmapserver.so is a symlink that points to another file. If 
you have a symlink make sure you have the file it needs to point to also.

If you are not sure about this stuff and nobody else is using mapserver 
on this box, you could clean it up by doing:

# remove all the mapserver libraries
sudo rm /usr/local/lib/libmapserver*

cd /path/to/mapserver/src
sudo make install

# and for good measure
sudo ldconfig

then try your test again.

-Steve

-Steve


More information about the mapserver-dev mailing list