Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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

Thanks!

€: 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!

share|improve this question
add comment

2 Answers

up vote 0 down vote accepted

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.

share|improve this answer
    
The given command says: ERROR: cannot open `/usr/bin/bla'. I can't take a look inside "bla", it's a program, not only a shell script. –  Sehe Sep 27 '12 at 14:07
    
OK, redo the symbolic link with full paths, please. –  January Sep 27 '12 at 14:30
    
I came to that idea earlier by myself. Even with rm the old links and creating new ones, the error still appears. -sf also did not work. –  Sehe Sep 27 '12 at 14:52
    
OK. Plese run ls -l /usr/bin/bla and ls -l /opt/bladir/bla and report the exact output of these commands. –  January Sep 27 '12 at 15:00
add comment

Often this type of error message is shown, if you don't have execution bit enabled. Check whether the main file as well as the link is given execution permission.

I'm suspecting your /opt may be mounted from a separate partition and it isn't mounted with exec mount option

share|improve this answer
    
The excecution bit is set and /opt/ is not on a separate partition :/ –  Sehe Sep 27 '12 at 14:29
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.