If you're dealing with a CGI script I've found that setting the LD_LIBRARY_PATH inside the perl cgi script does not work. Instead I've had to add a line to the Apache conf file in order to export the environment file correctly, like so: PassEnv LD_LIBRARY_PATH