• PhantomJS complains about "missing" Qt platform plugin "xcb".


    So I plainly installed phantomjs. Running it gives me following output:

    $ phantomjs --version
    This application failed to start because it could not find or load the Qt platform plugin "xcb".
    
    Available platform plugins are: phantom.
    
    Reinstalling the application may fix this problem.
    PhantomJS has crashed. Please read the bug reporting guide at
    <http://phantomjs.org/bug-reporting.html> and file a bug report.
    Aborted (core dumped)
    

    So far so bad. If case I used my favorite search engine and also asked on IRC, unfortunately I am still clueless on how to get it running.

    Obviously I checked for Qt dependencies, but they are satisfied.

    Running ldd against both the Qt XCB module and phantomjs reveals nothing missing:

    $ ldd /usr/lib/qt/plugins/platforms/libqxcb.so 
            linux-vdso.so.1 (0x00007fff48df2000)
            libQt5XcbQpa.so.5 => /usr/lib/libQt5XcbQpa.so.5 (0x00007f3698239000)
            libQt5Gui.so.5 => /usr/lib/libQt5Gui.so.5 (0x00007f3697afd000)
            libQt5Core.so.5 => /usr/lib/libQt5Core.so.5 (0x00007f3697426000)
            libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x00007f369709e000)
            libc.so.6 => /usr/lib/libc.so.6 (0x00007f3696d00000)
            libX11-xcb.so.1 => /usr/lib/libX11-xcb.so.1 (0x00007f3696afe000)
            libXi.so.6 => /usr/lib/libXi.so.6 (0x00007f36968eb000)
            libSM.so.6 => /usr/lib/libSM.so.6 (0x00007f36966e3000)
            libICE.so.6 => /usr/lib/libICE.so.6 (0x00007f36964c6000)
            libxcb.so.1 => /usr/lib/libxcb.so.1 (0x00007f369629d000)
            libxcb-image.so.0 => /usr/lib/libxcb-image.so.0 (0x00007f3696098000)
            libxcb-icccm.so.4 => /usr/lib/libxcb-icccm.so.4 (0x00007f3695e93000)
            libxcb-sync.so.1 => /usr/lib/libxcb-sync.so.1 (0x00007f3695c8a000)
            libxcb-xfixes.so.0 => /usr/lib/libxcb-xfixes.so.0 (0x00007f3695a82000)
            libxcb-shm.so.0 => /usr/lib/libxcb-shm.so.0 (0x00007f369587e000)
            libxcb-randr.so.0 => /usr/lib/libxcb-randr.so.0 (0x00007f369566e000)
            libxcb-shape.so.0 => /usr/lib/libxcb-shape.so.0 (0x00007f369546a000)
            libxcb-keysyms.so.1 => /usr/lib/libxcb-keysyms.so.1 (0x00007f3695267000)
            libxcb-xinerama.so.0 => /usr/lib/libxcb-xinerama.so.0 (0x00007f3695062000)
            libxcb-xkb.so.1 => /usr/lib/libxcb-xkb.so.1 (0x00007f3694e45000)
            libxkbcommon-x11.so.0 => /usr/lib/libxkbcommon-x11.so.0 (0x00007f3694c3d000)
            libfontconfig.so.1 => /usr/lib/libfontconfig.so.1 (0x00007f36949f9000)
            libfreetype.so.6 => /usr/lib/libfreetype.so.6 (0x00007f369473c000)
            libglib-2.0.so.0 => /usr/lib/libglib-2.0.so.0 (0x00007f3694429000)
            libX11.so.6 => /usr/lib/libX11.so.6 (0x00007f36940e8000)
            libxkbcommon.so.0 => /usr/lib/libxkbcommon.so.0 (0x00007f3693ea8000)
            libQt5DBus.so.5 => /usr/lib/libQt5DBus.so.5 (0x00007f3693c1d000)
            libpthread.so.0 => /usr/lib/libpthread.so.0 (0x00007f3693a00000)
            libm.so.6 => /usr/lib/libm.so.6 (0x00007f36936fc000)                                                                                                           
            libgcc_s.so.1 => /usr/lib/libgcc_s.so.1 (0x00007f36934e5000)                                                                                                   
            libpng16.so.16 => /usr/lib/libpng16.so.16 (0x00007f36932ad000)                                                                                                 
            libharfbuzz.so.0 => /usr/lib/libharfbuzz.so.0 (0x00007f369304e000)                                                                                             
            libz.so.1 => /usr/lib/libz.so.1 (0x00007f3692e38000)                                                                                                           
            libGL.so.1 => /usr/lib/libGL.so.1 (0x00007f3692bc4000)                                                                                                         
            libicui18n.so.57 => /usr/lib/libicui18n.so.57 (0x00007f369274a000)                                                                                             
            libicuuc.so.57 => /usr/lib/libicuuc.so.57 (0x00007f36923a2000)                                                                                                 
            libpcre16.so.0 => /usr/lib/libpcre16.so.0 (0x00007f3692137000)                                                                                                 
            libdl.so.2 => /usr/lib/libdl.so.2 (0x00007f3691f33000)                                                                                                         
            librt.so.1 => /usr/lib/librt.so.1 (0x00007f3691d2b000)                                                                                                         
            libsystemd.so.0 => /usr/lib/libsystemd.so.0 (0x00007f3691ca3000)                                                                                               
            /usr/lib64/ld-linux-x86-64.so.2 (0x00005586406b4000)                                                                                                           
            libXext.so.6 => /usr/lib/libXext.so.6 (0x00007f3691a91000)                                                                                                     
            libuuid.so.1 => /usr/lib/libuuid.so.1 (0x00007f369188c000)                                                                                                     
            libXau.so.6 => /usr/lib/libXau.so.6 (0x00007f3691686000)                                                                                                       
            libXdmcp.so.6 => /usr/lib/libXdmcp.so.6 (0x00007f3691480000)                                                                                                   
            libxcb-util.so.1 => /usr/lib/libxcb-util.so.1 (0x00007f369127a000)                                                                                             
            libexpat.so.1 => /usr/lib/libexpat.so.1 (0x00007f3691050000)                                                                                                   
            libbz2.so.1.0 => /usr/lib/libbz2.so.1.0 (0x00007f3690e40000)
            libpcre.so.1 => /usr/lib/libpcre.so.1 (0x00007f3690bcb000)
            libdbus-1.so.3 => /usr/lib/libdbus-1.so.3 (0x00007f369097b000)
            libgraphite2.so.3 => /usr/lib/libgraphite2.so.3 (0x00007f369074f000)
            libxcb-dri3.so.0 => /usr/lib/libxcb-dri3.so.0 (0x00007f369054c000)
            libxcb-present.so.0 => /usr/lib/libxcb-present.so.0 (0x00007f3690349000)
            libxshmfence.so.1 => /usr/lib/libxshmfence.so.1 (0x00007f3690146000)
            libglapi.so.0 => /usr/lib/libglapi.so.0 (0x00007f368ff15000)
            libXdamage.so.1 => /usr/lib/libXdamage.so.1 (0x00007f368fd12000)
            libXfixes.so.3 => /usr/lib/libXfixes.so.3 (0x00007f368fb0c000)
            libxcb-glx.so.0 => /usr/lib/libxcb-glx.so.0 (0x00007f368f8f0000)
            libxcb-dri2.so.0 => /usr/lib/libxcb-dri2.so.0 (0x00007f368f6eb000)
            libXxf86vm.so.1 => /usr/lib/libXxf86vm.so.1 (0x00007f368f4e5000)
            libdrm.so.2 => /usr/lib/libdrm.so.2 (0x00007f368f2d3000)
            libicudata.so.57 => /usr/lib/libicudata.so.57 (0x00007f368d857000)
            libresolv.so.2 => /usr/lib/libresolv.so.2 (0x00007f368d640000)
            libcap.so.2 => /usr/lib/libcap.so.2 (0x00007f368d43c000)
            liblzma.so.5 => /usr/lib/liblzma.so.5 (0x00007f368d216000)
            liblz4.so.1 => /usr/lib/liblz4.so.1 (0x00007f368d004000)
            libgcrypt.so.20 => /usr/lib/libgcrypt.so.20 (0x00007f368ccf3000)
            libgpg-error.so.0 => /usr/lib/libgpg-error.so.0 (0x00007f368cadf000)
    
    $  ldd /usr/bin/phantomjs
            linux-vdso.so.1 (0x00007ffca6b6d000)
            libz.so.1 => /usr/lib/libz.so.1 (0x00007f1160fb8000)
            libsqlite3.so.0 => /usr/lib/libsqlite3.so.0 (0x00007f1160ca6000)
            libfontconfig.so.1 => /usr/lib/libfontconfig.so.1 (0x00007f1160a62000)
            libfreetype.so.6 => /usr/lib/libfreetype.so.6 (0x00007f11607a5000)
            libssl.so.1.0.0 => /usr/lib/libssl.so.1.0.0 (0x00007f1160534000)
            libcrypto.so.1.0.0 => /usr/lib/libcrypto.so.1.0.0 (0x00007f11600bc000)
            libicui18n.so.57 => /usr/lib/libicui18n.so.57 (0x00007f115fc42000)
            libicuuc.so.57 => /usr/lib/libicuuc.so.57 (0x00007f115f89a000)
            libicudata.so.57 => /usr/lib/libicudata.so.57 (0x00007f115de1e000)
            libdl.so.2 => /usr/lib/libdl.so.2 (0x00007f115dc1a000)
            librt.so.1 => /usr/lib/librt.so.1 (0x00007f115da12000)
            libpthread.so.0 => /usr/lib/libpthread.so.0 (0x00007f115d7f5000)
            libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x00007f115d46d000)
            libm.so.6 => /usr/lib/libm.so.6 (0x00007f115d169000)
            libgcc_s.so.1 => /usr/lib/libgcc_s.so.1 (0x00007f115cf52000)
            libc.so.6 => /usr/lib/libc.so.6 (0x00007f115cbb4000)
            /lib64/ld-linux-x86-64.so.2 (0x00007f11611ce000)
            libexpat.so.1 => /usr/lib/libexpat.so.1 (0x00007f115c98a000)
            libbz2.so.1.0 => /usr/lib/libbz2.so.1.0 (0x00007f115c77a000)
            libpng16.so.16 => /usr/lib/libpng16.so.16 (0x00007f115c544000)
            libharfbuzz.so.0 => /usr/lib/libharfbuzz.so.0 (0x00007f115c2e5000)
            libglib-2.0.so.0 => /usr/lib/libglib-2.0.so.0 (0x00007f115bfd2000)
            libgraphite2.so.3 => /usr/lib/libgraphite2.so.3 (0x00007f115bda6000)
            libpcre.so.1 => /usr/lib/libpcre.so.1 (0x00007f115bb33000)
    

    Then, what I found as suggestion was that perhaps the Qt platform plugins could not be found. This can be fixed by setting an env var. Unfortunately this did not help either.

    $ export QT_QPA_PLATFORM_PLUGIN_PATH=/usr/lib/qt/plugins/platforms/ 
    $ phantomjs --version
    This application failed to start because it could not find or load the Qt platform plugin "xcb".
    
    Available platform plugins are: phantom (from /usr/lib/qt/plugins/platforms/), phantom.
    
    Reinstalling the application may fix this problem.
    PhantomJS has crashed. Please read the bug reporting guide at
    <http://phantomjs.org/bug-reporting.html> and file a bug report.
    Aborted (core dumped)
    

    And now I am running out of ideas…

  • Update:

    Uninstalled phantomjs and downloaded the static build from their website. Same issue and output.

    However they also state that GLIBC_ 2.7 is required, which is not listed by

    $ strings /usr/lib/libstdc++.so.6 | grep "^GLIBC_2."
    GLIBC_2.3
    GLIBC_2.2.5
    GLIBC_2.14
    GLIBC_2.4
    GLIBC_2.18
    GLIBC_2.17
    GLIBC_2.3.2
    

    The installed glibc version is 2.24-2. No idea how this works together, but might that be a thing?

  • QT_QPA_PLATFORM='' does the trick -.-

qt511 coredump2 phantomjs1 Posts 3Views 1256
Log in to reply
Bloom Email Optin Plugin

Looks like your connection to Antergos Community Forum was lost, please wait while we try to reconnect.