installation - 在 Mac 上安装 PhantomJS

标签 installation phantomjs casperjs

我正在尝试在我的 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/

相关文章:

visual-studio-2010 - 当我使用 InstallShield 安装我的应用程序时,我收到一条 "Installation Failed"消息。有没有办法让我看到它失败的原因?

javascript - 使用 TeaSpoon 编写规范时直接使用 PhantomJS 访问页面 - Jasmine

javascript - php 执行 phantom js 可以工作,但 casperjs 不工作 权限被拒绝

javascript - casperJS assertExists 不传递带有空格的类

node.js - 使用 CasperJS 等待多个替代选择器

python - 出现错误 "error: command ' cl.exe' 失败 : No such file or directory"

ruby-on-rails - #<String :0x00000003a27a58> 的未定义方法 `each'

installation - 微软 Visual Studio "setup blocked"

javascript - 使用带有 jQ​​uery 的 casperjs 来填写表单

javascript - CasperJS点击按钮不会触发任何东西