我正在尝试使用Slimerjs运行Casperjs
运行在Centos 6.8上
当尝试从php运行casperjs+slimerjs时,我得到:
Gecko error: it seems /usr/bin/firefox is not compatible with SlimerJS.
See Gecko version compatibility. If version is correct, launch slimerjs
with --debug=true to see Firefox error message当我尝试使用debug=true:/usr/local/bin/casperjs /tmp/casperjs-5cn484 --debug=true --engine=slimerjs从控制台运行脚本时(我也尝试过使用xvfb-run )
我知道这个错误:
Xlib: extension "RANDR" missing on display ":99".
process 5588: D-Bus library appears to be incorrectly set up; failed to read machine uuid: Failed to open "/var/lib/dbus/machine-id": No such file or directory
See the manual page for dbus-uuidgen to correct this issue.
D-Bus not built with -rdynamic so unable to print a backtrace
Redirecting call to abort() to mozalloc_abort
/usr/lib/node_modules/slimerjs/src/slimerjs: line 167: 5588 Segmentation fault "$SLIMERJSLAUNCHER" -app "$SLIMERDIR/application.ini" $PROFILE -no-remote "$@"如果我运行slimerjs --debug=true,我会得到:
Error: cannot open display: :1.1 Gecko error: it seems /usr/bin/firefox is not compatible with SlimerJS. See Gecko version compatibility. If version is correct, launch slimerjs with --debug=true to see Firefox error message
我已经尝试了很多解决方案,比如:
Xvfb :1 -screen 0 1024x768x24 +extension RANDR &和export DISPLAY=:1 (包括:99 )export LD_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu/我不知道我还在尝试什么,有些建议吗?
发布于 2016-12-22 19:54:37
无论如何,我让它运行,安装dbus包,并使用comand:
dbus-uuidgen > /var/lib/dbus/machine-idXlib: extension "RANDR" missing on display ":99"不是什么大问题.
来自:http://www.torkwrench.com/2011/12/16/d-bus-library-appears-to-be-incorrectly-set-up-failed-to-read-machine-uuid-failed-to-open-varlibdbusmachine-id/
发布于 2016-12-22 13:08:26
你看到本期了吗?显然你应该:
更改src/application.ini . MaxVersion=45.*中的最大版本
我不确定是否有xrandr的错误,但这似乎没有关系。可能是实验的结果或者是一条青鱼。
还有一个DBUS错误可能导致随后的分段错误。
我建议你试着一步一步地检查:
https://stackoverflow.com/questions/41131177
复制相似问题