Search code examples
phpmakefileldsaxonphp-extension

php module: cannot open shared object file: No such file or directory


I am trying to install the Saxon-C XSLT-parser with it's PHP module on my server as explained here: http://www.saxonica.com/saxon-c/index.xml. I successfully installed it and compiled the PHP module. Maybe someone of you might have an idea, whats going wrong.

When starting apache I get the following error:

PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php5/20100525/saxon.so' - 
libsaxon.so: cannot open shared object file: No such file or directory in Unknown on line 0

I know that it is searching the LD library.

more /etc/ld.so.conf.d/jetvm.conf
/opt/saxon/rt/lib/amd64
/opt/saxon/rt/lib/amd64/jetvm

tail -n 1 /etc/apache2/envvars
export LD_LIBRARY_PATH=/opt/saxon/rt/lib/amd64:/opt/saxon/rt/lib/amd64/jetvm:$LD_LIBRARY_PATH

echo $LD_LIBRARY_PATH
/opt/saxon/rt/lib/amd64:/opt/saxon/rt/lib/amd64/jetvm/

Everything seems to be right. I also double checked that all Paths are existing.

I have already checked the following threads (and much more), which couldn't help me:

After trying a couple of hours without any progress I really hope, someone can help me here. Maybe the solution is quite dump. I have not much experience with languages which has to be compiled, therefore I can only understand vaguely what is going on here.

Have many thanks in advance and best wishes.


Solution

  • With the friendly aid of ond1, who is one of the developers of the Saxon, I finally found a solution. Apparently there are some Paths hardcoded so, you have to ignore the installer's question where to put the files and install it to /usr/lib.

    I Uninstalled previous installation, installed to /usr/lib and coompiled from there - and now it works.