Cannot execute symbolic link on Debian
hi there,
I have strange problem (strange for me) with sym-links: 1. I have executable, I can execute it by (chmod is 777 for sure): ../usr/bin/ccache 2. I create the sym-link ln -sf ../usr/bin/ccache mylink 3. chmod 777 mylink (for sure) 4. ./mylink error message comes up: "no such file or directory". Please tell me what am I doing wrong? Thnx in advance. -jn. |
I get the same error, but looking at ccache man page shows where/how to put the symbolic link. I followed those instructions and didn't see the error. I'm not sure if that's what you need to do.
|
Thanks for hint. I've tried but no effect. Still the same problem :-(.
|
I noticed what appeared to be some extra .. in your spec
Quote:
Code:
ln -sf /FullPath-to-Real-Image Fake-link Code:
(cd ~; ln -sf /usr/bin/ccache mylink) 1. Makes sure you are in your home directory, where you most certainly ought to be able to create a link and 2. Makes sure to use an absolute path name to the procedure. A couple of other points: 1. Instead of using a compound command, you can also separate it into two distinct commands if you do not mind ending up in your home directory: Code:
cd ~; ln -sf /usr/bin/ccache mylink Code:
file /usr/bin/ccache Code:
ls -l /usr/bin/ccache On my system, I in fact do not have such a file at all. Check yours to be sure what you are looking for is actually there and it is what you expect it to be. Hope this helps you out. |
hi there,
thanks for hints. The only problem is that I cannot execute the link. The target is executable, I can execute "../usr/bin/ccache" (rights are 777 for sure). I've tried to create a link with absolute and with relative path as well, the behavior is the same. What is strange for me, I can edit the file that the link points to, e.g. 1. ln -sf ../usr/bin/ccache mylink 2. file mylink -> ... symbolic link to ... 3. vim ./mylink (rights are also set to 777) (not nice, I know :-)). But I can see the content of the binary file! 4. ./mylink mylink: no such file or directory. Is it possible that there's some problem with SELinux? Or some strange access right settings that dinosaur like me is not aware of? :-). Thanks in advance. -jn. |
All times are GMT -5. The time now is 09:14 AM. |