Friday, June 11, 2010

Error d'execució al carregar una llibreria

L'error era aquest: la llibreria estava posada a una ruta errònia. Poso l'explicació que m'ha servit.

liblablabla.so.5: cannot open shared object file: No such file or directory

Problem: An application is running on Linux 7.x which uses gcc 3.2.x. It gets one of the following error messages:

libstdc++.so.5: cannot open shared object file:
No such file or directory
libgcc_s.so.1: cannot open shared object file:
No such file or directory
Explanation: libstdc++.so.5 (the library for gcc 3.2.x) is installed in /usr/local/lib However, the system will only seach /usr/lib (where the 2.95.0 and other older libraries are stored).

Solution: Create symbolic links to make the libraries appear in the old folder:

ln -s /usr/local/lib/libblablabla.so.5
/usr/lib/libblablabla.so.5
ln -s /usr/local/lib/libblablabla.so.1
/usr/lib/libblablabla.so.1

No comments:

Post a Comment