符号链接层数过多

符号链接层数过多

我只想将源文件链接到目标文件。但是,我得到Too many levels of symbolic links并且不知道我的文件出了什么问题。以下是信息

[root@cluster ~]# ls /export/apps/mathematics/matlab2012a/bin/
activate_matlab.sh    insttype.ini     license.txt  mbuildopts.sh   
mw_mpiexec    registry    deactivate_matlab.sh  lcdata_utf8.xml
m3iregistry  mcc    mw_smpd     untitled.m    deploytool    
lcdata.xml     matlab     mex   optsetup.sh   util  
engopts.sh    lcdata.xsd     matopts.sh   mexext  output.txt    
worker    glnxa64   ldd    mbuild       mexopts.sh     ProductRoots

[root@cluster ~]# ln -s /export/apps/mathematics/matlab2012a/bin/matlab /usr/bin/matlab
ln: accessing `/usr/bin/matlab': Too many levels of symbolic links

[root@cluster ~]# ls /usr/bin/matlab
ls: cannot access /usr/bin/matlab: Too many levels of symbolic links

[root@cluster ~]# which matlab
/export/apps/mathematics/matlab2012a/bin/matlab



[root@cluster ~]# ls -l /usr/bin | grep matlab
lrwxrwxrwx 1 root root           8 Nov 20  2014 matlab -> ./matlab
[root@cluster ~]# /usr/bin/matlab
bash: /usr/bin/matlab: Too many levels of symbolic links

我该如何修复它?

答案1

/usr/bin您创建了一个名为的符号链接,matlab该链接链接到其自身。

相关内容