I am trying to install Firefox 12 on Debian Squeeze x86_64. I have extracted the contents of the compressed Firefox downloadable into the
/opt directory and have marked the files
/opt/firefox/firefox-bin as executable. This is similar to the procedure outlined in the question How to install the real Firefox on Debian? asked here before. However, when I try to run Firefox by issuing the command
/opt/firefox/firefox I get the following error:
XPCOMGlueLoad error for file /opt/firefox/libxpcom.so: libxul.so: cannot open shared object file: No such file or directory Couldn't load XPCOM.
I tried to print the shared libraries required by
ldd libxpcom.so and got the following response:
linux-gate.so.1 => (0xf778a000) libpthread.so.0 => /lib32/libpthread.so.0 (0xf775a000) libxul.so => not found libplds4.so => /usr/lib32/libplds4.so (0xf7756000) libplc4.so => /usr/lib32/libplc4.so (0xf7752000) libnspr4.so => /usr/lib32/libnspr4.so (0xf771e000) libdl.so.2 => /lib32/libdl.so.2 (0xf771a000) libmozalloc.so => not found libstdc++.so.6 => /usr/lib32/libstdc++.so.6 (0xf7624000) libm.so.6 => /lib32/libm.so.6 (0xf75fe000) libgcc_s.so.1 => /usr/lib32/libgcc_s.so.1 (0xf75e0000) libc.so.6 => /lib32/libc.so.6 (0xf7499000) /lib/ld-linux.so.2 (0xf778b000)
It is clear that
libmozalloc.so are not found. However, I noticed these are present in
/opt/firefox folder which resulted from the extraction. Digging a little further I noticed that
libxul.so is also present in
I tried setting the environment variable
/opt/firefox but still got the same error.
- How can I ask the firefox executable to look in a specific directory for the libraries it was not able to find?
- Do you think setting the
LD_LIBRARY_PATHshell variable is the recommended approach to solving such problems in Debian. I am asking this because I feel Debian has more structured solutions to similar problems, rather than just setting some environment variables (for example, the Alternatives System, although it may not be relevant to this particular problem).