Java 在mac中运行phantomjs

Java 在mac中运行phantomjs,java,macos,path,phantomjs,Java,Macos,Path,Phantomjs,我试图在OSX上使用phantomjs,但使用两种方法都不起作用: 使用下载文件夹中的下载文件,然后 解压…当运行需要phantomjs的应用程序时,我发现错误: java.io.IOException:无法运行程序phantomjs:error=2,没有这样的文件或目录 我安装了phantomjs并根据以下内容执行: sudo ln-s/path/to/phantomjs/usr/local/bin/ 但它已经安装: ln:/usr/local/bin//phantomjs:文件存在 我怎样才

我试图在OSX上使用phantomjs,但使用两种方法都不起作用:

使用下载文件夹中的下载文件,然后 解压…当运行需要phantomjs的应用程序时,我发现错误: java.io.IOException:无法运行程序phantomjs:error=2,没有这样的文件或目录

我安装了phantomjs并根据以下内容执行: sudo ln-s/path/to/phantomjs/usr/local/bin/

但它已经安装:

ln:/usr/local/bin//phantomjs:文件存在

我怎样才能做到这一点


非常感谢

你在哪里有幻影?ls-lt/usr/local/bin/phantomjs的结果是什么?谢谢你的回答……结果是:lrwxr-xr-x1 root wheel 52 Jun 23 21:16/usr/local/bin/phantomjs->/Applications/phantomjs.app/Contents/MacOS/phantomjs和head-n 1/Applications/phantomjs.app/Contents/MacOS/phantomjs的结果:head:/Applications/phantomjs.app/Contents/MacOS/phantomjs:没有这样的文件或目录,那么那里就没有phantomjs了。查看链接的线程,您似乎在某个地方丢失了bin。