问题描述
我已经将SublimeLinter和sublimelinter-cppcheck软件包安装到了Sublime Text 3中.
I have intalled SublimeLinter and sublimelinter-cppcheck packages to my Sublime Text 3.
问题在于,崇高的文字说的是SublimeLinter: WARNING: cppcheck deactivated, cannot locate 'cppcheck'
.我发现cppcheck无法找到linter可执行文件,因此我决定将linter的路径添加到我的系统$PATH
属性中.但事实是,我在系统上找不到linter可执行文件.
The problem is that sublime text is saying SublimeLinter: WARNING: cppcheck deactivated, cannot locate 'cppcheck'
. I figured out that cppcheck cannot find linter executable, so I decided that I will add path to linter to my system $PATH
property. But the thing is that I cannot find linter executable on my system.
起初,我认为它尚未安装,但我意识到必须与SublimeLinter软件包一起安装.但事实并非如此.我试图使用Unix find命令找到它,唯一的结果是:
At first I thought that it's not installed but that I realised that it has to install with SublimeLinter package. But it did not. I tried to find it using Unix find command the only result is :
/Users/syky/.rbenv/versions/2.1.3/lib/ruby/gems/2.1.0/gems/cocoapods-core-0.34.2/lib/cocoapods-core/specification/linter
那不是我想要的.
我正在使用Sublime Text 3,Mac OS X Yosemite和ZSH作为外壳程序.
I am using Sublime Text 3, Mac OS X Yosemite and ZSH as my shell.
推荐答案
SublimeLinter正在寻找 cppcheck
可执行文件,您显然尚未安装.它不查找名为linter
的文件.在继续操作之前,请确保您已完全阅读并理解 SublimeLinter-cppcheck
文档.安装cppcheck
的最简单方法是通过 Homebrew 或 MacPorts (我个人最喜欢的).否则,您将必须下载并编译源代码,如果您使用C ++进行编程,则假定您知道该怎么做.
SublimeLinter is looking for the cppcheck
executable, which you apparently haven't installed. It is not looking for a file named linter
. Please ensure that you have completely read and understood the SublimeLinter-cppcheck
documentation before proceeding. The easiest way to install cppcheck
is either via Homebrew or MacPorts (my personal favorite). Otherwise, you'll have to download and compile the source, which, if you're programming in C++, I assume you know how to do.
一旦安装了cppcheck
,请在/usr/bin
中创建指向它的符号链接,以便Sublime可以找到它.修改ZSH PATH
不会做任何事情,除非您始终从终端启动Sublime,因为从Dock启动的程序的PATH
是不同的.
Once you have cppcheck
installed, create a symlink to it in /usr/bin
so Sublime can find it. Modifying your ZSH PATH
won't do anything, unless you always launch Sublime from Terminal, because the PATH
for programs launched from the Dock is different.
这篇关于找不到SublimeLinter cppcheck linter可执行文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!