简体   繁体   English

安装Sublime文本命令行功能时出错

[英]Error installing Sublime text command line functionality

I'm trying to install a symbolic link to Sublime Text (ie being able to type "subl Foo.java" into the terminal and launching Sublime). 我正在尝试安装指向Sublime Text的符号链接(即能够在终端中键入“ subl Foo.java”并启动Sublime)。 I'm using the following: ln -s "/Applications/Sublime Text.app/Contents/SharedSupport/bin/subl" /usr/local/bin/sublime (which is provided at http://olivierlacan.com/posts/launch-sublime-text-3-from-the-command-line/ ). 我正在使用以下命令:ln -s“ / Applications / Sublime Text.app/Contents/SharedSupport/bin/subl” / usr / local / bin / sublime(位于http://olivierlacan.com/posts/从命令行启动sublime-text-3- )。 However, I'm getting the following error: 但是,出现以下错误:

ln: /usr/local/bin/sublime: File exists

I've tried editing my path file but nothing seems to be working. 我尝试编辑路径文件,但似乎没有任何效果。 Has anyone had a similar problem and have a fix? 有没有人遇到过类似的问题并已解决?

It seems like your symlink is still existing, so there is no need to create it twice. 您的符号链接似乎仍然存在,因此无需创建两次。 Maybe you put the line 也许你把线

ln -s "/Applications/Sublime Text.app/Contents/SharedSupport/bin/subl" /usr/local/bin/sublime

into your .bash_profile ? 进入您的.bash_profile if your /usr/local/bin/sublime file exists there is no need for that. 如果您的/usr/local/bin/sublime文件存在,则无需这样做。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM