Chinaunix
标题:
可执行文件的符号链接无效
[打印本页]
作者:
bijianing
时间:
2011-09-03 17:11
标题:
可执行文件的符号链接无效
对一个可执行文件做符号链接,但是通过符号链接文件执行,就出错
我的系统:Fedora 14 x86_64
下面是执行命令的过程:
[bjn@ggjd test]$ ls -l
总用量 96
-rwxrwxr-x 1 bjn bjn 89540 9月 3 18:08 ccache
[bjn@ggjd test]$ file ccache
ccache: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.9, not stripped
[bjn@ggjd test]$ ln -s ccache lcc
[bjn@ggjd test]$ ls -l
总用量 96
-rwxrwxr-x 1 bjn bjn 89540 9月 3 18:08 ccache
lrwxrwxrwx 1 bjn bjn 6 9月 3 18:09 lcc -> ccache
[bjn@ggjd test]$ ./lcc
lcc: No such file or directory
[bjn@ggjd test]$ ./ccache
ccache, a compiler cache. Version 2.4
Copyright Andrew Tridgell, 2002
Usage:
...
复制代码
这是为什么呢????
作者:
Missex
时间:
2011-09-03 20:00
file lcc 显示什么?
可能这个程序ccache有内部特殊的处理, 不允许改变名称
你这么做试试呢
mkdir ttt
ln -sv ccache ttt/ccache
ttt/ccache
作者:
bijianing
时间:
2011-09-04 10:26
谢谢楼上,按照你的说法的确好用,谢谢。
欢迎光临 Chinaunix (http://bbs.chinaunix.net/)
Powered by Discuz! X3.2