Reputation: 1127
When I use phantomjs on ubuntu 12.0, the following error occurs:
phantomjs: cannot connect to X server
After Googling, I tried:
root@AY14021815431085179aZ:~# xhost local:root
xhost: unable to open display ""
But it still doesn't work.
Upvotes: 1
Views: 3771
Reputation: 312
The distribution-specific package may not always be on the latest stable version. If you don't want to install and use xvbf (for versions <=1.4 of phantomjs), or if you want a relatively recent version, with updated functionality, uninstall your instance of phantomjs and do the following:
download a binary here: http://phantomjs.org/download.html
unpack (e.g., tar -xvjpf *.bz2
)
make sure the binary is exported or otherwise in your $PATH
phantomjs -v
Try running the tests that depend on phantomjs, assuming phantomjs is already integrated into the test suite.
Upvotes: 5