Best way to get spidermonkey js on Ubuntu?

前端 未结 5 1114
小鲜肉
小鲜肉 2020-12-30 04:15

I need to install the Spidermonkey JS engine on my work machine. The project I\'m working on has a jslint script that requires Spidermonkey or a similar js binary. I\'ve tri

5条回答
  •  情深已故
    2020-12-30 04:36

    You can build from source, but spider monkey is still available on ubuntu, it's just been renamed to "libmozjs". Install "libmozjs-24-bin" and then either refer to it as "js24" or symlink /usr/bin/js24 to "js", like so:

    sudo apt-get install libmozjs-24-bin; sudo ln -sf /usr/bin/js24 /usr/bin/js
    

提交回复
热议问题