我正在尝试在我的 Mac (Yosemite) 上安装 PhantomJS。
我做了以下事情:
npm install phantomjs
然后我做了:
npm install phantomjs-prebuilt
两者都出现在我的 node_modules 中。但是当我尝试运行时
phantomjs --version
我得到 -bash: phantomjs: command not found
还尝试从下载网站安装二进制文件,但没有。我错过了什么?最终目标是使用 casperjs 但目前 casper 正在询问
Fatal: [Errno 2] No such file or directory; did you install phantomjs?
我以为我做了....?
最佳答案
如果您正在使用 Homebrew ,您可以输入:
brew tap homebrew/cask
brew cask install phantomjs
关于installation - 在 Mac 上安装 PhantomJS,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36993962/