Symbolic Links

Symbolic link
In computing, a symbolic link (also symlink or soft link) is a special type of file that contains a reference to another file or directory in the form of an absolute or relative path.

How create it ?
ln  -s     file_which_exist      file_which_we_want_create

# ls libmozjs.so.1 libmozjs.so.1 libmozjs.so
 * 1) ln -s libmozjs.so.1 libmozjs.so
 * ls

How check / open symbolic link ?
ls  -l   name_link [gg@localhost Nowy katalog]$ ls -l libmozjs.so

lrwxrwxrwx. 1 gg gg 8 06-22 18:22 libmozjs.so -> libmozjs.so.1

Why we use this ?
Example error:

$ ./kompozer-bin ./kompozer-bin: error while loading shared libraries: libmozjs.so: cannot open shared object file: No such file or directory

-  You can install strace to find where this app looking libmozjs.so library, then :

strace -e open name_app

[gg@localhost kompozer]$ strace -e open ./kompozer-bin [ Process PID=901 runs in 32 bit mode. ] open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3 open("/lib/tls/i686/sse2/libmozjs.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) open("/lib/tls/i686/libmozjs.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) open("/usr/lib/libmozjs.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) ./kompozer-bin: error while loading shared libraries: libmozjs.so: cannot open shared object file: No such file or directory +++ exited with 127 +++

Now you know where kompozer looking libmozjs.so.

- You can try search libmozjs.so in PCLinuxOS repository which package this lib provide

apt-cache searchfile libmozjs.so

Page created in KompoZer and edited on this wiki.