我正在尝试使用Slimerjs 运行 Casperjs

  • 我安装了SlimerJS 0.10.2
  • 我已经安装了Mozilla Firefox 45.5.1(也尝试使用50)
  • 我已经安装了CasperJS 1.1.3
  • 我已经安装了xvfb 1.17.4

  • 在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.1Gecko error: it seems /usr/bin/firefox is not compatible with SlimerJS.See Gecko version compatibility. If version is correct, launch slimerjswith --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/
  • 升级降级firefox版本
  • 检查是否有字体,所以只有一种,所以
  • 没问题

    我不知道自己在尝试什么,有什么建议吗? :)

    最佳答案

    无论如何,我通过安装dbus软件包并使用以下命令来运行它:

    dbus-uuidgen > /var/lib/dbus/machine-id
    
    Xlib: extension "RANDR" missing on display ":99"没什么大问题...
    来自:ojota

    关于linux - 具有Slimerjs的CasperJS-Xlib : extension "RANDR" missing on display ":99",我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/41131177/

    10-13 03:05