如何在Ubuntu上安装JSLint? [英] How do I install JSLint on Ubuntu?
问题描述
如何在Ubuntu上安装JSLint?
我下载了源 jsl-0.3.0-src.tar.gz
从 http://www.javascriptlint.com/download.htm
然后将其解压缩到一个名为的目录jsl-0.3.0
在我的桌面上。然后我把它移到 / usr / local / bin
,我读过我的路径。我还想提一下,我已经安装了 Rhino 1.7
。
当我尝试从终端运行 jsl
时收到以下消息:
没有找到命令'jsl',你的意思是:
命令'jls'来自包'sleuthkit'(宇宙)
命令'js 'from package'rhino'(main)
命令'sl'来自包'sl'(宇宙)
命令'fsl'来自包'fsl'(multiverse)
jsl:command not found
所以我如何正确安装JSLint?
这里是我遵循的指示让jslint在Ubuntu 10.10 / Vim 7.3(和Mac OS X)上工作。
编辑
<那么,我刚刚在给定的链接中发现了一个错误。以下是正确的步骤(假设您已将存档下载并解压缩到桌面:
$ cd / path / to / jsl-0.3.0 / src
$ make -f Makefile.ref
$ cp Linux_All_DBG.OBJ / jsl / usr / local / bin / jsl
此时你可以打开一个新的终端窗口并输入 $ jsl
来显示快速帮助或调用它来自Vim或直接在终端上的文件中。
END EDIT
-
/ usr / local / bin
不是你的PATH,它只是你的PATH
环境变量。$ echo $ PATH
会告诉你这些目录是什么,因此你可以在哪里放jsl
可执行文件。您也可以将它放在另一个地方并为.bashrc
添加别名。 -
为什么你希望能够从
rhino
运行jslint
?
How do I install JSLint on Ubuntu?
I downloaded the source jsl-0.3.0-src.tar.gz
from http://www.javascriptlint.com/download.htm
and then extracted it to a dir called jsl-0.3.0
on my Desktop. I then moved it to /usr/local/bin
which I have read is my PATH. I also want to mention that I have Rhino 1.7
installed already.
When I try to run jsl
from terminal I got the following message:
No command 'jsl' found, did you mean:
Command 'jls' from package 'sleuthkit' (universe)
Command 'js' from package 'rhino' (main)
Command 'sl' from package 'sl' (universe)
Command 'fsl' from package 'fsl' (multiverse)
jsl: command not found
So I how do I properly install JSLint?
Here are the instructions I followed to have jslint working on Ubuntu 10.10/Vim 7.3 (and Mac OS X).
EDIT
So, I've just spotted a mistake in the given link. Here are the correct steps (assuming you have already downloaded and unpacked the archive to your desktop:
$ cd /path/to/jsl-0.3.0/src
$ make -f Makefile.ref
$ cp Linux_All_DBG.OBJ/jsl /usr/local/bin/jsl
At that point you can open a new terminal window and type $ jsl
to display a quick help or invoke it from Vim or directly on a file in the terminal.
END EDIT
/usr/local/bin
is not your "PATH", it's only one of the many directories that can be part yourPATH
environment variable.$ echo $PATH
will tell you what these directories are and thus where you can put thejsl
executable. You can also put it in another place and add an alias to your.bashrc
.Why do you expect to be able to run
jslint
fromrhino
?
这篇关于如何在Ubuntu上安装JSLint?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!