java.lang.IllegalStateException:驱动程序不可执行:/resources/phantomjs-2.1.1-linux-x86_64/bin/phantomjs

java.lang.IllegalStateException:驱动程序不可执行:/resources/phantomjs-2.1.1-linux-x86_64/bin/phantomjs,java,linux,selenium,jenkins,phantomjs,Java,Linux,Selenium,Jenkins,Phantomjs,我试图在Jenkins(Unix)中以无头模式运行selenium UI测试。我正在使用适用于unix环境的phantomJS的正确版本 phantomjs-2.1.1-linux-x86_64/bin/phantomjs 我得到了上面提到的错误。有什么见解吗?如果需要,我会提供更多细节 java.lang.IllegalStateException: The driver is not executable: /resources/phantomjs-2.1.1-linux-x86_64/b

我试图在Jenkins(Unix)中以无头模式运行selenium UI测试。我正在使用适用于unix环境的phantomJS的正确版本

phantomjs-2.1.1-linux-x86_64/bin/phantomjs
我得到了上面提到的错误。有什么见解吗?如果需要,我会提供更多细节

java.lang.IllegalStateException: The driver is not executable: /resources/phantomjs-2.1.1-linux-x86_64/bin/phantomjs

实际文件需要可执行才能运行。更改文件权限以使其可执行,如:

chmod 755 /resources/phantomjs-2.1.1-linux-x86_64/bin/phantomjs

然后重新运行。HTH

是的,使文件可执行后,问题消失了。谢谢!