Symbolic Link Error – No Such File or Directory


I created a symbolic Link from a File at "/opt/bladir/bla" to "bla". So "bla" is now in "/usr/bin/bla". But if I want to call "bla" at terminal, there comes the no such file or directory error. I looked up at "/usr/bin/bla" and the file is linking correctly at "/opt/bladir/bla".

What can be the error?

P.S. here is my terminal "entry": sudo ln -s /opt/bladir/bla bla


€: Problem solved. According to the Feature List, 12.04 should have Multiarch support… 'should'. I got the ia32-libs from synaptic and now the program wents just fine. As it looks, my symbolic links where correct.

Thank you for all the answers!

Best Answer

EDIT: the solution below does not work. It is apparent that the symbolic link is broken, because file -L cannot open the symbolic link /usr/bin/bla. In this case, do the following:

sudo ln -sf /opt/bladir/bla /usr/bin/bla

using full paths (-f is to force overwriting the previous symbolic link, if there is one).

Hm. I think that the program "bla" may be looking for things that are installed in /opt/bladir and cannot find them. For example, it can be a shell script wrapper around a Java executable, with path relative to current directory: but your current directory is /usr/bin/, and not /opt/bladir/.

If the following works

file -L /usr/bin/bla

...then it is definitely not a problem with your symbolic link.

Check whether "bla" is a shell script that you can modify, take a look inside -- maybe you will find the problem. Possibly, adding /opt/bladir to your PATH would be a better solution.

Related Question