Menu

#34 error while loading shared libraries: libxcb-util.so.0: cannot open shared object file: No such file or directory

1.0
open
nobody
None
2022-07-29
2018-11-22
encore64
No

Hi! Testing C64Debugger-v0.64.56-linux-x64/C64Debugger (from csdb-link)

On a fresh Ubuntu 18.04 installation I get the following missing library-error :

$ ./c64debugger
./c64debugger: error while loading shared libraries: libxcb-util.so.0: cannot open shared object file: No such file or directory

The available packages I have are:

$ apt-cache search libxcb-util
libxcb-util-dev - utility libraries for X C Binding -- atom, aux and event
libxcb-util0-dev - dummy transitional package for utility libraries for X C Binding -- atom, aux and event
libxcb-util1 - utility libraries for X C Binding -- atom, aux and event

Best regards,
encore

Discussion

  • slajerek

    slajerek - 2018-11-29

    Interesting, actually I had to install these libraries on my Debian (both x64 and i386):

    sudo apt-get install libxcb-util-dev
    sudo apt-get install libxcb-util0
    sudo apt-get install libxcb-util0-dev

    And that was enough to start it. Maybe these packages are broken and not linked correctly in Ubuntu? You can always put the libxcb-util.so.0 manually in somewhere and add its path to LD_LIBRARY_PATH and then reload with ldconfig. Are you sure you have them installed? :-)

    These libraries are needed for copy-paste and are needed by the libclipboard that I am using for this: https://github.com/jtanx/libclipboard

    By the way, you might try also compiling sources using the Makefile, maybe it helps.

     

    Last edit: slajerek 2018-11-29
  • encore64

    encore64 - 2018-11-29

    Hi slajerek. I have libxcb-util1 installed, the only (non dev) libxcb-util package available by default from the Ubuntu repositories.
    I (successfully) tried building from the git-repositories. As I've recently built vice-emu on the same installation, only a few more packages were needed, besides of git:
    libgl-dev
    libglu1-mesa-dev
    libxcb-util-dev
    upx-ucl
    (perhaps this one should be mentioned in the readme)

    So this works. I'm not getting much wiser, but I unpacked the executables and tried running ldd and grepping for libxcb. An interesting difference is that my executable lacks the call to libxcb-util

    ~/compiling/c64-debugger-code/MTEngine$ upx -d c64debugger
                           Ultimate Packer for eXecutables
                              Copyright (C) 1996 - 2017
    UPX 3.94        Markus Oberhumer, Laszlo Molnar & John Reiser   May 12th 2017
    
            File size         Ratio      Format      Name
       --------------------   ------   -----------   -----------
      11110592 <-   3387948   30.49%   linux/amd64   c64debugger
    
    Unpacked 1 file.
    
    ~/compiling/c64-debugger-code/MTEngine$ ldd c64debugger | grep libxcb
        libxcb.so.1 => /usr/lib/x86_64-linux-gnu/libxcb.so.1 (0x00007f1e12cea000)
        libxcb-shm.so.0 => /usr/lib/x86_64-linux-gnu/libxcb-shm.so.0 (0x00007f1e0c65e000)
        libxcb-render.so.0 => /usr/lib/x86_64-linux-gnu/libxcb-render.so.0 (0x00007f1e0c451000)
    
    ~/Downloads/C64Debugger-v0.64.56-linux-x64/C64Debugger$ upx -d c64debugger
                           Ultimate Packer for eXecutables
                              Copyright (C) 1996 - 2017
    UPX 3.94        Markus Oberhumer, Laszlo Molnar & John Reiser   May 12th 2017
    
            File size         Ratio      Format      Name
       --------------------   ------   -----------   -----------
      10148280 <-   3144752   30.99%   linux/amd64   c64debugger
    
    Unpacked 1 file.
    
    ~/Downloads/C64Debugger-v0.64.56-linux-x64/C64Debugger$ ldd c64debugger | grep libxcb
        libxcb-util.so.0 => not found
        libxcb.so.1 => /usr/lib/x86_64-linux-gnu/libxcb.so.1 (0x00007fc61b3b5000)
        libxcb-shm.so.0 => /usr/lib/x86_64-linux-gnu/libxcb-shm.so.0 (0x00007fc616f92000)
        libxcb-render.so.0 => /usr/lib/x86_64-linux-gnu/libxcb-render.so.0 (0x00007fc616d85000)
    
     

    Last edit: encore64 2018-11-29
  • slajerek

    slajerek - 2021-02-23

    This is interesting. It seems it is related to problems with my old Debian build machine...

     

    Last edit: slajerek 2021-02-23
  • Wolfram Sang

    Wolfram Sang - 2021-02-26

    For the record, my Debain (Bullseye) also doesn't have libxcb-util0 anymore but only -util1. Maybe time to update the Debian build machine? :)

     
  • Ricardo Quesada

    Ricardo Quesada - 2021-08-13

    ditto with Linux Mint 20.2.

     
  • Fabio NET

    Fabio NET - 2021-08-27

    For SLACKWARE users or other distribution rapid solution easy create link symbolic

    Create the symbolic link to the library and run the debugger again and this time it should work in the git repository as well.

    ;-)

    $ su

    ln -s /usr/lib64/libxcb-util.so /usr/lib64/libxcb-util.so.0

    or

    $ su

    cd /usr/lib64

    ln -s libxcb-util.so libxcb-util.so.0

    I am not an expert on these things but something is apt let me know if the solution is also valid in other distributions including the most used ones debian, ubuntu, etc.

    after several attempts, without inserting any point to the environment variable, the program looked for a link not created.

    If it creates problems after linking to other applications please let me know.

    TNX ;-)

     
  • Trickster

    Trickster - 2021-09-22

    Same problem on Arch Linux. Any solutions yet?

    [john@jupiter64 C64-65XE-NES-Debugger]$ ./c64debugger 
    ./c64debugger: error while loading shared libraries: libxcb-util.so.0: cannot open shared object file: No such file or directory
    
    extra/xcb-util-wm 0.4.1-3 (34.2 KiB 224.4 KiB) (Installed)
        Utility libraries for XC Binding - client and window-manager helpers for ICCCM
    extra/xcb-util-renderutil 0.3.9-3 (9.7 KiB 36.0 KiB) (Installed)
        Utility libraries for XC Binding - Convenience functions for the Render extension
    extra/xcb-util-keysyms 0.4.0-3 (8.3 KiB 29.3 KiB) (Installed)
        Utility libraries for XC Binding - Standard X key constants and conversion to/from keycodes
    extra/xcb-util-image 0.4.0-3 (17.9 KiB 52.8 KiB) (Installed)
        Utility libraries for XC Binding - Port of Xlib's XImage and XShmImage functions
    extra/xcb-util-cursor 0.1.3-3 (12.4 KiB 32.6 KiB) 
        XCB cursor library
    extra/xcb-util 0.4.0-3 (12.5 KiB 38.2 KiB) (Installed)
        Utility libraries for XC Binding
    
    [john@jupiter64 C64-65XE-NES-Debugger]$ pacman -Ql xcb-util
    xcb-util /usr/
    xcb-util /usr/include/
    xcb-util /usr/include/xcb/
    xcb-util /usr/include/xcb/xcb_atom.h
    xcb-util /usr/include/xcb/xcb_aux.h
    xcb-util /usr/include/xcb/xcb_event.h
    xcb-util /usr/include/xcb/xcb_util.h
    xcb-util /usr/lib/
    xcb-util /usr/lib/libxcb-util.so
    xcb-util /usr/lib/libxcb-util.so.1
    xcb-util /usr/lib/libxcb-util.so.1.0.0
    xcb-util /usr/lib/pkgconfig/
    xcb-util /usr/lib/pkgconfig/xcb-atom.pc
    xcb-util /usr/lib/pkgconfig/xcb-aux.pc
    xcb-util /usr/lib/pkgconfig/xcb-event.pc
    xcb-util /usr/lib/pkgconfig/xcb-util.pc
    xcb-util /usr/share/
    xcb-util /usr/share/licenses/
    xcb-util /usr/share/licenses/xcb-util/
    xcb-util /usr/share/licenses/xcb-util/COPYING
    

    EDIT:

    I can make it work by creating a symlink as suggested by Fabio above but I don't like doing this. It may possibility create other issues in the future with other programs.

    It looks like a wonderful program, so thanks very much for that! But very CPU hungry.

     

    Last edit: Trickster 2021-09-26

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.