Error while loading shared libraries libxcb xinerama so 0

Hello, I am trying to use V 5.0 Linux on Ubuntu 16.04 LTS. When run from terminal I get the following error: ./ArenaTracker: error while loading shared libraries: libxcb-xinerama.so.0: cannot open ...

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and
privacy statement. We’ll occasionally send you account related emails.

Already on GitHub?
Sign in
to your account


Closed

HappyLer opened this issue

May 29, 2017

· 4 comments


Closed

libxcb-xinerama.so.0 missing

#52

HappyLer opened this issue

May 29, 2017

· 4 comments

Comments

@HappyLer

Hello,
I am trying to use V 5.0 Linux on Ubuntu 16.04 LTS. When run from terminal I get the following error:
./ArenaTracker: error while loading shared libraries: libxcb-xinerama.so.0: cannot open shared object file: No such file or directory

Edit: Just installed it via apt-get install libxcb-xinerama and it works now. Maybe the binary should check for dependencies and notifiy the user if something is missing.

@supertriodo

I’d suggest linux users to download the AppImage.
I’ll have to change it the name to specify better that is a linux binary.

The AppImage won’t give you dependency problems. If you still want to use the linux static build, you can install the missing dependencies:

sudo apt-get install libxcb-xinerama0

IAmS4n, frederikaalund, VaticanCameos99, panos-stavrianos, ArnasRS, connectkushal, Shelfcol, kevinNejad, SecondFlight, alexciuffa, and 9 more reacted with thumbs up emoji
ArnasRS, SecondFlight, and saya6 reacted with hooray emoji
IAmS4n, ArnasRS, BartekkPL, SecondFlight, rbracco, saya6, user7652314326, soda92, and NuCleoids reacted with heart emoji

@supertriodo

Didn’t you need to install libpng12?

@nicolasvillavicencio

This just happen to me and its solved when installed libxcb-xinerama0 what is odd is the problem started when changed the option transparency to Framed and restarted AT

@supertriodo

Wow that’s really weird. Dependencies shouldn’t be conditional.

This topic has been deleted. Only users with topic management privileges can see it.

  • I built Qt for static compilation on Ubuntu using the configuration:

    ./configure -static -platform linux-g++-64 -prefix /home/scott/Qt5.7.0 -opensource -make libs
    

    I then built a statically compiled Qt application, but when I run the application on a clean Ubuntu Linux installation I get the error:

    error while loading shared libraries: libxcb-xinerama.so
    

    Is there a way to build my Qt application so that this library will be statically compiled into the executable?

  • @ScottLupton You would need a static version of this library and libraries this one needs

  • I don’t usually use Linux so I’m having trouble finding what I need to install to get the static version.

    I installed installed the libxcb-xinerama packages and some other xinerama packages I found search the repository:

    libxcb-xinerama0 
    libxcb-xinerama0-dev
    libxinerama1
    libxinerama-dev
    

    Unfortunately that didn’t solve the problem.

    Looking at the output from configure I noticed some libraries were set to load at runtime:

    XCB .................. yes (system library)
      EGL on X ........... no
      GLX ................ yes
      MIT-SHM ............ yes
      Xcb-Xlib ........... yes
      Xcursor ............ yes (loaded at runtime)
      Xfixes ............. yes (loaded at runtime)
      Xi ................. no
      Xi2 ................ yes
      Xinerama ........... yes
      Xrandr ............. yes (loaded at runtime)
      Xrender ............ yes
      XKB ................ no
      XShape ............. yes
      XSync .............. yes
      XVideo ............. yes
    

    I therefore added -xrandr -xcursor -xfixes parameters to configure, after which it changed to:

    XCB .................. yes (system library)
      EGL on X ........... no
      GLX ................ yes
      MIT-SHM ............ yes
      Xcb-Xlib ........... yes
      Xcursor ............ yes
      Xfixes ............. yes
      Xi ................. no
      Xi2 ................ yes
      Xinerama ........... yes (loaded at runtime)
      Xrandr ............. yes
      Xrender ............ yes
      XKB ................ no
      XShape ............. yes
      XSync .............. yes
      XVideo ............. yes
    

    I then ran configure again also adding -xnerama, after which I got:

    XCB .................. yes (system library)
      EGL on X ........... no
      GLX ................ yes
      MIT-SHM ............ yes
      Xcb-Xlib ........... yes
      Xcursor ............ yes
      Xfixes ............. yes
      Xi ................. no
      Xi2 ................ yes
      Xinerama ........... yes
      Xrandr ............. yes
      Xrender ............ yes
      XKB ................ no
      XShape ............. yes
      XSync .............. yes
      XVideo ............. yes
    

    I thought that would be the solution, but after rebuilding Qt and my application I still get: error while loading shared libraries: libxcb-xinerama.so

    I also tried adding this to the project’s .pro file:

    SLIBS += /usr/lib/x86_64-linux-gnu/libxcb-xinerama.a
    

    But that also didn’t solve the problem.

    How do I statically compile the xcb-xinerama library?

  • I’ve been trying to statically compile my application on Linux for a week, but I’m still no closer to a solution.

    Getting nothing done for a week has been a real nightmare. I think it’s time to move on from the hard liqueur and hit the crack cocaine :)

    If anyone can point me in the right general direction I’d be grateful.

  • Hi and welcome to devnet,

    IIRC, when presented with both option the linker uses the shared library. Note that if you don’t need Xinerama support for your application you can also disable the option.

    Also, don’t forget the implication about using a static build of Qt.

  • @SGaist said in Qt Static Compile Linux — Error Loading libxcb-xinerama.so:

    Note that if you don’t need Xinerama support for your application you can also disable the option.

    Thanks for the suggestion. I ran configure with -no-xinerama and checked the output to confirm it was disabled:

    Xinerama ........... no
    

    I then built Qt and built my application, but it still said «error while loading shared libraries: libxcb-xinerama.so»

    I just tried another solution, which was to run configure with -qt-xcb so it uses the xcb libraries bundled with Qt, and that finally solved the problem. It’s very late now so I’ll read about -qt-xcb more when I got up tomorrow.

    Before I mark this as solved I best ask, are there any possible issues with using -qt-xcb?

    Thanks again for the help.

  • No issue in using it.

    The only thing to take into account is that any update to the Qt provided xcb library won’t happen until next release of Qt (unless you’re building from the latest git revision) while your system xcb will follow your distribution updates.

    That’s a tradeoff that only you can decide upon.

  • @SGaist OK, but how to disable it?

    After update 5.15 (the removed -qt-xcb). Static Qt builds do not run without installing additional packages.
    Installation of additional packages makes the purpose of static linking pointless. Qt Architects don’t understand it?

    How to build empty STATIC (without libs in boundled directory) Qt application and run it on clean Ubuntu 20 system WITHOUT installation any additional packages?
    It’s impossible for now.

  • @HankLA said in Qt Static Compile Linux — Error Loading libxcb-xinerama.so:

    Qt Architects don’t understand it?

    Please read https://forum.qt.io/topic/113070/qt-code-of-conduct before writing such posts.
    And also please realize that this is user forum mainly driven by volunteers, no need to use such language…

  • @jsulm
    My claim is not addressed to the forum participants of course.
    It’s addressed to the product managers directly. Perhaps there was a misunderstanding becouse of my lame English, sorry. I don’t want to sound rude.
    One need to understand that we pay money for the ability to distribute our software with a static link. This option is almost broken even for empty projects.
    The situation (static link) gets worse from version to version.

  • If you have a license than contact the Qt Company directly with your issue, as @jsulm wrote, this is a volunteer driven user forum.

    As for your issue: Qt 5.15 dropped one of xcb in-tree library because all the officially supported distributions are providing it. All the in-tree included external libraries require work to keep up to date it terms of version as well as security which is work already handled by distribution hence dropping.
    If you want a really fully static Qt, you would also need to provide a static OpenSSL, MySQL, etc…

  • @SGaist

    @SGaist said in Qt Static Compile Linux — Error Loading libxcb-xinerama.so:

    If you have a license than contact the Qt Company directly with your issue

    Unforunatly, it does not work for the «static build» issues.

    I’ve spent many weeks doing Qt static builds for linux and macOS, including OpenSSL. Before version Qt 5.15 it was very tricky but possible (except some special issues with ICU). Application run without installation packages and any additionl libs on Ubuntu 16 and higher.

    But now, they removed -qt-xcb flag ( https://doc.qt.io/qt-5/linux-requirements.html ) and the number of dependencies has grown dramatically.

    Below I will talk about an empty Qt application only. Without OpenSSL, curl, etc.

    Here is dependency list of the empty app run at Ubuntu 20. Build station: static Qt 5.15 and ubuntu 16.

    alex@alex-ubuntu-clean:~$ ldd test
    	linux-vdso.so.1 (0x00007ffeb7793000)
    	libfontconfig.so.1 => /lib/x86_64-linux-gnu/libfontconfig.so.1 (0x00007ff32d63a000)
    	libfreetype.so.6 => /lib/x86_64-linux-gnu/libfreetype.so.6 (0x00007ff32d57b000)
    	libxcb-glx.so.0 => /lib/x86_64-linux-gnu/libxcb-glx.so.0 (0x00007ff32d55e000)
    	libX11-xcb.so.1 => /lib/x86_64-linux-gnu/libX11-xcb.so.1 (0x00007ff32d559000)
    	libxcb-icccm.so.4 => /lib/x86_64-linux-gnu/libxcb-icccm.so.4 (0x00007ff32d552000)
    	libxcb-image.so.0 => /lib/x86_64-linux-gnu/libxcb-image.so.0 (0x00007ff32d34d000)
    	libxcb-shm.so.0 => /lib/x86_64-linux-gnu/libxcb-shm.so.0 (0x00007ff32d346000)
    	libxcb-keysyms.so.1 => /lib/x86_64-linux-gnu/libxcb-keysyms.so.1 (0x00007ff32d341000)
    	libxcb-randr.so.0 => /lib/x86_64-linux-gnu/libxcb-randr.so.0 (0x00007ff32d32e000)
    	libxcb-render-util.so.0 => /lib/x86_64-linux-gnu/libxcb-render-util.so.0 (0x00007ff32d327000)
    	libxcb-sync.so.1 => /lib/x86_64-linux-gnu/libxcb-sync.so.1 (0x00007ff32d31d000)
    	libxcb-xfixes.so.0 => /lib/x86_64-linux-gnu/libxcb-xfixes.so.0 (0x00007ff32d313000)
    	libxcb-render.so.0 => /lib/x86_64-linux-gnu/libxcb-render.so.0 (0x00007ff32d302000)
    	libxcb-shape.so.0 => /lib/x86_64-linux-gnu/libxcb-shape.so.0 (0x00007ff32d2fd000)
    	libxcb-xinerama.so.0 => not found
    	libxcb-xkb.so.1 => /lib/x86_64-linux-gnu/libxcb-xkb.so.1 (0x00007ff32d2df000)
    	libxcb.so.1 => /lib/x86_64-linux-gnu/libxcb.so.1 (0x00007ff32d2b5000)
    	libX11.so.6 => /lib/x86_64-linux-gnu/libX11.so.6 (0x00007ff32d178000)
    	libxkbcommon-x11.so.0 => /lib/x86_64-linux-gnu/libxkbcommon-x11.so.0 (0x00007ff32d16b000)
    	libxkbcommon.so.0 => /lib/x86_64-linux-gnu/libxkbcommon.so.0 (0x00007ff32d129000)
    	libicui18n.so.55 => not found
    	libicuuc.so.55 => not found
    	libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007ff32d123000)
    	libGL.so.1 => /lib/x86_64-linux-gnu/libGL.so.1 (0x00007ff32d09b000)
    	libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007ff32d076000)
    	libstdc++.so.6 => /lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007ff32ce95000)
    	libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007ff32cd46000)
    	libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007ff32cd2b000)
    	libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007ff32cb39000)
    	/lib64/ld-linux-x86-64.so.2 (0x00007ff32d692000)
    	libexpat.so.1 => /lib/x86_64-linux-gnu/libexpat.so.1 (0x00007ff32cb0b000)
    	libuuid.so.1 => /lib/x86_64-linux-gnu/libuuid.so.1 (0x00007ff32cb00000)
    	libpng16.so.16 => /lib/x86_64-linux-gnu/libpng16.so.16 (0x00007ff32cac8000)
    	libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007ff32caac000)
    	libxcb-util.so.1 => /lib/x86_64-linux-gnu/libxcb-util.so.1 (0x00007ff32c8a6000)
    	libXau.so.6 => /lib/x86_64-linux-gnu/libXau.so.6 (0x00007ff32c8a0000)
    	libXdmcp.so.6 => /lib/x86_64-linux-gnu/libXdmcp.so.6 (0x00007ff32c896000)
    	libGLdispatch.so.0 => /lib/x86_64-linux-gnu/libGLdispatch.so.0 (0x00007ff32c7de000)
    	libGLX.so.0 => /lib/x86_64-linux-gnu/libGLX.so.0 (0x00007ff32c7aa000)
    	libbsd.so.0 => /lib/x86_64-linux-gnu/libbsd.so.0 (0x00007ff32c790000)
    

    Of cource it does not start.

    alex@alex-ubuntu-clean:~$ ./test
    ./test: error while loading shared libraries: libxcb-xinerama.so.0: cannot open shared object file: No such file or directory
    

    So, I need to build package or installer. Here is dependency list of the not empty real app. Build station: static Qt 5.14.2 and ubuntu 16.

    alex@alex-ubuntu-clean:~/Documents/rms.viewer.1.0.7.b7$ ldd viewer
    	linux-vdso.so.1 (0x00007ffcdef1a000)
    	libfontconfig.so.1 => /lib/x86_64-linux-gnu/libfontconfig.so.1 (0x00007f719bbde000)
    	libfreetype.so.6 => /lib/x86_64-linux-gnu/libfreetype.so.6 (0x00007f719bb1f000)
    	libxcb-glx.so.0 => /lib/x86_64-linux-gnu/libxcb-glx.so.0 (0x00007f719bb02000)
    	libX11-xcb.so.1 => /lib/x86_64-linux-gnu/libX11-xcb.so.1 (0x00007f719bafd000)
    	libxcb.so.1 => /lib/x86_64-linux-gnu/libxcb.so.1 (0x00007f719bad3000)
    	libX11.so.6 => /lib/x86_64-linux-gnu/libX11.so.6 (0x00007f719b996000)
    	libxkbcommon.so.0 => /lib/x86_64-linux-gnu/libxkbcommon.so.0 (0x00007f719b952000)
    	libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f719b94c000)
    	libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f719b930000)
    	libGL.so.1 => /lib/x86_64-linux-gnu/libGL.so.1 (0x00007f719b8a8000)
    	libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f719b885000)
    	libstdc++.so.6 => /lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f719b6a4000)
    	libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f719b553000)
    	libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f719b538000)
    	libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f719b346000)
    	/lib64/ld-linux-x86-64.so.2 (0x00007f719bc36000)
    	libexpat.so.1 => /lib/x86_64-linux-gnu/libexpat.so.1 (0x00007f719b318000)
    	libuuid.so.1 => /lib/x86_64-linux-gnu/libuuid.so.1 (0x00007f719b30f000)
    	libpng16.so.16 => /lib/x86_64-linux-gnu/libpng16.so.16 (0x00007f719b2d7000)
    	libXau.so.6 => /lib/x86_64-linux-gnu/libXau.so.6 (0x00007f719b2cf000)
    	libXdmcp.so.6 => /lib/x86_64-linux-gnu/libXdmcp.so.6 (0x00007f719b2c7000)
    	libGLdispatch.so.0 => /lib/x86_64-linux-gnu/libGLdispatch.so.0 (0x00007f719b20f000)
    	libGLX.so.0 => /lib/x86_64-linux-gnu/libGLX.so.0 (0x00007f719b1db000)
    	libbsd.so.0 => /lib/x86_64-linux-gnu/libbsd.so.0 (0x00007f719b1c1000)
    

    It’s not perfect, but it’s acceptable and it works on many systems.

  • Содержание

    1. Error while loading shared libraries libxcb xinerama so 0
    2. Ошибка error while loading shared libraries
    3. Что означает error while loading shared libraries?
    4. Как исправить ошибку?
    5. 1. Библиотека не установлена
    6. 2. Библиотека находится не в том каталоге
    7. 3. Неверная версия библиотеки
    8. Выводы
    9. Ошибка error while loading shared libraries в Linux

    I built Qt for static compilation on Ubuntu using the configuration:

    I then built a statically compiled Qt application, but when I run the application on a clean Ubuntu Linux installation I get the error:

    Is there a way to build my Qt application so that this library will be statically compiled into the executable?

    @ScottLupton You would need a static version of this library and libraries this one needs

    I don’t usually use Linux so I’m having trouble finding what I need to install to get the static version.

    I installed installed the libxcb-xinerama packages and some other xinerama packages I found search the repository:

    Unfortunately that didn’t solve the problem.

    Looking at the output from configure I noticed some libraries were set to load at runtime:

    I therefore added -xrandr -xcursor -xfixes parameters to configure, after which it changed to:

    I then ran configure again also adding -xnerama, after which I got:

    I thought that would be the solution, but after rebuilding Qt and my application I still get: error while loading shared libraries: libxcb-xinerama.so

    I also tried adding this to the project’s .pro file:

    But that also didn’t solve the problem.

    How do I statically compile the xcb-xinerama library?

    I’ve been trying to statically compile my application on Linux for a week, but I’m still no closer to a solution.

    Getting nothing done for a week has been a real nightmare. I think it’s time to move on from the hard liqueur and hit the crack cocaine 🙂

    If anyone can point me in the right general direction I’d be grateful.

    Hi and welcome to devnet,

    IIRC, when presented with both option the linker uses the shared library. Note that if you don’t need Xinerama support for your application you can also disable the option.

    Also, don’t forget the implication about using a static build of Qt.

    Note that if you don’t need Xinerama support for your application you can also disable the option.

    Thanks for the suggestion. I ran configure with -no-xinerama and checked the output to confirm it was disabled:

    I then built Qt and built my application, but it still said «error while loading shared libraries: libxcb-xinerama.so»

    I just tried another solution, which was to run configure with -qt-xcb so it uses the xcb libraries bundled with Qt, and that finally solved the problem. It’s very late now so I’ll read about -qt-xcb more when I got up tomorrow.

    Before I mark this as solved I best ask, are there any possible issues with using -qt-xcb?

    Thanks again for the help.

    No issue in using it.

    The only thing to take into account is that any update to the Qt provided xcb library won’t happen until next release of Qt (unless you’re building from the latest git revision) while your system xcb will follow your distribution updates.

    That’s a tradeoff that only you can decide upon.

    @SGaist OK, but how to disable it?

    After update 5.15 (the removed -qt-xcb). Static Qt builds do not run without installing additional packages.
    Installation of additional packages makes the purpose of static linking pointless. Qt Architects don’t understand it?

    How to build empty STATIC (without libs in boundled directory) Qt application and run it on clean Ubuntu 20 system WITHOUT installation any additional packages?
    It’s impossible for now.

    Qt Architects don’t understand it?

    Please read https://forum.qt.io/topic/113070/qt-code-of-conduct before writing such posts.
    And also please realize that this is user forum mainly driven by volunteers, no need to use such language.

    @jsulm
    My claim is not addressed to the forum participants of course.
    It’s addressed to the product managers directly. Perhaps there was a misunderstanding becouse of my lame English, sorry. I don’t want to sound rude.
    One need to understand that we pay money for the ability to distribute our software with a static link. This option is almost broken even for empty projects.
    The situation (static link) gets worse from version to version.

    If you have a license than contact the Qt Company directly with your issue, as @jsulm wrote, this is a volunteer driven user forum.

    As for your issue: Qt 5.15 dropped one of xcb in-tree library because all the officially supported distributions are providing it. All the in-tree included external libraries require work to keep up to date it terms of version as well as security which is work already handled by distribution hence dropping.
    If you want a really fully static Qt, you would also need to provide a static OpenSSL, MySQL, etc.

    If you have a license than contact the Qt Company directly with your issue

    Unforunatly, it does not work for the «static build» issues.

    I’ve spent many weeks doing Qt static builds for linux and macOS, including OpenSSL. Before version Qt 5.15 it was very tricky but possible (except some special issues with ICU). Application run without installation packages and any additionl libs on Ubuntu 16 and higher.

    But now, they removed -qt-xcb flag ( https://doc.qt.io/qt-5/linux-requirements.html ) and the number of dependencies has grown dramatically.

    Below I will talk about an empty Qt application only. Without OpenSSL, curl, etc.

    Here is dependency list of the empty app run at Ubuntu 20. Build station: static Qt 5.15 and ubuntu 16.

    Of cource it does not start.

    So, I need to build package or installer. Here is dependency list of the not empty real app. Build station: static Qt 5.14.2 and ubuntu 16.

    It’s not perfect, but it’s acceptable and it works on many systems.

    Источник

    Новые и опытные пользователи Linux могут сталкиваться с ошибкой error loading shared libraries во время запуска программ, также с ней могут сталкиваться программисты и все желающие компилировать программное обеспечение в своей системе. Эта ошибка в дословном переводе означает что возникла проблема во время загрузки общей библиотеки. О том что такое библиотеки и зачем они нужны вы можете узнать из статьи библиотеки Linux.

    В этой же статье мы рассмотрим что значит ошибка error while loading shared libraries более подробно, а главное, как ее решить.

    Даже если вы не компилируете свои программы, то вы можете увидеть ошибку error while loading shared libraries: имя_библиотеки: cannot open shared object file: No such file or directory достаточно часто во время установки новых программ не через пакетный менеджер или программ, предназначенных для другого дистрибутива. Как я уже говорил, она возникает потому, что система не может найти библиотеку.

    А вот почему ее нельзя найти и загрузить, это уже интересно. Этому может быть несколько причин:

    • Библиотека не установлена в системе;
    • Библиотека установлена, но неизвестно куда;
    • Библиотека установлена правильно, но имеет не ту версию.

    При решении проблемы мы будем руководствоваться именно этими причинами и пытаться их решить.

    Как исправить ошибку?

    1. Библиотека не установлена

    Первый вариант, тут все понятно, библиотеки просто нет в системе, поэтому мы и получаем такую ошибку. Верный способ ее решения — просто найти пакет библиотеки с помощью пакетного менеджера и установить ее. Обычно, пакеты с библиотеками называются так же, как и сами библиотеки с префиксом lib.

    Например, если нам не хватает библиотеки libfuse2.so, то мы можем найти ее в Ubuntu такой командой:

    sudo apt search libfuse2

    Затем осталось только установить ее:

    sudo apt install libfuse2

    Если перед вами стоит задача собрать программу из исходников, то вам понадобится не только установить саму библиотеку, но и заголовочные файлы для нее:

    sudo apt install libfuse-dev

    И так для любой библиотеки. Но это не всегда помогает.

    2. Библиотека находится не в том каталоге

    Бывает что библиотека установлена, мы установили ее или она поставлялась вместе с программой, но ошибка как была, так и есть. Причиной этому может быть то, что загрузчик Linux не может найти библиотеку.

    Поиск библиотек выполняется по всех папках, которые указаны в конфигурационных файлах /etc/ld.conf.d/. По умолчанию, это такие каталоги, как /usr/lib, /lib, /usr/lib64, /lib64. Если библиотека установлена в другой каталог, то, возможно, это и есть причина проблемы.

    Вы можете посмотреть какие библиотеки сейчас доступны загрузчику с помощью команды:

    Найти, где находится ваша библиотека можно с помощью команды locate. Например, нас интересует библиотека librtfreader.so:

    Теперь мы знаем, что она находится по адресу /opt/kingsoft/wps-office/office6/. А значит, для работы программы необходимо сделать чтобы загрузчик библиотек ее видел. Для этого можно добавить путь в один из файлов /etc/ld.so.conf.d/ или же в переменную LD_LIBRARY_PATH:

    Опять же, так вы можете поставить с любой библиотекой, которая взывает ошибку. Еще один более простой метод — это просто создать символическую ссылку на нужную библиотеку в правильной папке:

    ln -s /opt/kingsoft/wps-office/office6/librtfreader.so /usr/lib/librtfreader.so

    3. Неверная версия библиотеки

    Эта причина ошибки довольно часто встречается при использовании программ не для вашего дистрибутива. Каждая библиотека имеет дополнительную версию, так называемую ревизию, которая записывается после расширения .so. Например, libav.so.1. Так вот, номер версии меняется всякий раз, когда в библиотеку вносятся какие-либо исправления.

    Часто возникает ситуация, когда в одном дистрибутиве программа собирается с зависимостью от библиотеки, например, libc.so.1, а в другом есть только libc.so.2. Отличия в большинстве случаев здесь небольшие и программа могла бы работать на второй версии библиотеки. Поэтому мы можем просто создать символическую ссылку на нее.

    Например, библиотеки libusb-1.0.so.1 нет. Но зато есть libusb-1.0.so.0.1, и мы можем ее использовать:

    Для этого просто создаем символическую ссылку на библиотеку:

    sudo ln -s /usr/lib/libusb-1.0.so.0.1 /usr/lib/libusb-1.0.so.1

    В большинстве случаев программа не заметит подмены и будет работать, как и ожидалось. Также для решения этой проблемы можно попытаться найти нужную версию библиотеки в интернете для своей архитектуры и поместить ее в папку /usr/lib/ или /usr/lib64/. Но после этого желательно обновить кэш:

    Выводы

    В этой статье мы рассмотрели почему возникает ошибка Error while loading shared libraries, а также как ее решить. В большинстве случаев проблема решается довольно просто и вы получите работоспособную программу. Надеюсь, эта информация была полезной для вас.

    Источник

    Многие пользователи Linux рано или поздно сталкиваются с ошибкой error while loading shared libraries. Как правило, при установке программ вручную. Сегодня поговорим об исправлении данной ошибки. Для примера возьмём старый ноутбук с Ubuntu 14.04 LTS, поддержка которой недавно закончилась, а значит что-то приходится доустанавливать вручную.

    Ошибка error while loading shared libraries означает, что программа, которую пользователь пытается запустить, не смогла найти необходимую для своего запуска библиотеку. Такое часто случается, если программа устанавливалась не из репозиториев, а вручную. Например, на скриншоте ниже мы видим, что свежая версия Mozilla Firefox требует для своей работы библиотеку libatomic.so.1, но не может её обнаружить.

    При этом, кстати, совершенно не обязательно, что данная библиотека отсутствует в системе. Поэтому сперва выполним поиск библиотеки (подробнее о locate в статье по этой ссылке):

    Естественно, в Вашем случае библиотека может называться иначе. Смотрите, что упоминается в тексте ошибки.

    Если команда ничего не выдаст, это значит, что библиотеки в системе нет (а вот если библиотека найдена, тогда об этом ниже).

    Поищем библиотеку в репозиториях:

    В результате мы получим перечень пакетов, которые в названии содержат libatomic:

    В моем случае речь идёт о стареньком ноутбуке с 32-битной системой, поэтому мой выбор пал на libatomic1. Если Вы собираете программу из исходников, то будет полезным поставить не только библиотеку, но и заголовочные файлы с приставкой -dev. Сама установка проста:

    В результате — актуальная версия Firefox в уже не поддерживаемой разработчиками Ubuntu (подробнее об установке новых версий Firefox в старых релизах Ubuntu в статье по ссылке).

    Кстати, иногда команда locate может не выдать Вам информацию о библиотеке, так как, на самом деле она не осуществляет поиск файлов или каталогов. Но это отдельный разговор. Посмотреть, установлена ли библиотека в системе, можно и при поиске пакетов в репозитории. Как видите, наш пакет libatomic1 теперь помечен как установленный.

    Теперь о том, что делать, если библиотека есть в системе, но ошибка error while loading shared libraries всё равно появляется. Очень часто причиной этого является то, что загрузчик ОС не может найти библиотеку. По умолчанию поиск производится в каталогах: /usr/lib, /lib, /usr/lib64, /lib64. Не исключено, что библиотека просто лежит за пределами этих каталогов.

    Вариантов тут несколько: переместить или скопировать библиотеку, ну или же указать загрузчику, где её искать. Последний способ более корректный, так как при нём Вы точно ничего не напортачите в системе.

    Можно зайти в папку /etc/ld.so.conf.d/, открыть там любой конфигурационный файл и просто прописать местонахождение нужной библиотеки.

    А можно сделать символьную (символическую) ссылку:

    ln -s [путь_к_библиотеке/имя_библиотеки] /usr/lib/[имя_библиотеки]

    Есть ещё одна причина ошибки while loading shared libraries даже когда нужна библиотека имеется в операционной системе. Библиотека может быть не той версии.

    Версия библиотеки (или ещё её называют ревизией) пишется после расширения .so. В нашем примере нам требовалась библиотека libatomic.so.1, т.е. libatomic первой версии.

    В разных дистрибутивах используются разные версии библиотек, а программы собираются под дистрибутив (и, как следствие, библиотеку конкретной версии). На практике же различия между версиями библиотек чаще всего минимальны. Поэтому для начала можно выдать библиотеку одной версии за библиотеку другой версии. В этом нам опять поможет символьная ссылка:

    ln -s [путь_к_библиотеке/настоящее_имя_библиотеки] [путь_к_библиотеке/имя_библиотеки_с_нужной_версией]

    Если этот способ не помог, то выход один — искать библиотеку нужной версии.

    И последнее: после манипуляций с библиотеками желательно обновить кэш командой

    Вот, пожалуй, и всё, что нужно знать про ошибку error while loading shared libraries.

    Источник

    I am setting up a python3 virtual environment for my development, so I am staying away from the package manager apt-install

    $ python3 -m venv . # create my environment in my working directory
    

    I then activated the venv and installed pyqt5

    $ source bin/activate
    $ pip install PyQt5
    

    I am notified of a successful installation and PyQt5 and PyQt5-Sip shows up in my pip list

    When I build a sample application I receive the error:

    qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "/path/to/venv/lib/python3.8/site-packages/PyQt5/Qt/plugins" even though it was found.
    This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
    
    Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, webgl, xcb.
    
    Aborted (core dumped)
    

    I exported the environment variable for debugging

    export QT_DEBUG_PLUGINS=1
    

    I try running my application again and here is the specific error I get in the linker

    QFactoryLoader::QFactoryLoader() looking at "/path/to/venv/lib/python3.8/site-packages/PyQt5/Qt/plugins/platforms/libqxcb.so"
    Found metadata in lib /path/to/venv/lib/python3.8/site-packages/PyQt5/Qt/plugins/platforms/libqxcb.so, metadata=
    {
        "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
        "MetaData": {
            "Keys": [
                "xcb"
            ]
        },
        "archreq": 0,
        "className": "QXcbIntegrationPlugin",
        "debug": false,
        "version": 331520
    }
    
    
    Got keys from plugin meta data ("xcb")
    QFactoryLoader::QFactoryLoader() checking directory path "/usr/bin/platforms" ...
    Cannot load library /path/to/venv/lib/python3.8/site-packages/PyQt5/Qt/plugins/platforms/libqxcb.so: (libxcb-xinerama.so.0: cannot open shared object file: No such file or directory)
    

    The important error here is

    libxcb-xinerama.so.0: cannot open shared object file: No such file or directory
    

    So I dig deeper. I decide to use the ldd command to parse the shared library dependencies.

    $ ldd /path/to/venv/lib/python3.8/site-packages/PyQt5/Qt/plugins/platforms/libqxcb.so
    

    and lo-and behold:

    libxcb-xinerama.so.0 => not found
    libxcb-xinerama.so.0 => not found
    

    These shared libraries are missing from the libqxcb shared library dependencies list. I would hope pip’s installation would have this included but it is not. I have not found a solution to this problem anywhere, and the small amount of sources I have found mentioned using apt-install to solve these issues. I don’t want to change my system, I prefer keeping things sandboxed.

    What can I do to fix this dependency?

    I wrote application for linux which uses Qt5.

    But when I am trying to launch it on the linux without Qt SDK installed, the output in console is:

    Failed to load platform plugin «xcb». Available platforms are:

    How can I fix this? May be I need to copy some plugin file?
    When I use ubuntu with Qt5 installed, but I rename Qt directory, the same problem occurs. So, it uses some file from Qt directory…

    UPDATE:
    when I create in the app dir «platforms» folder with the file libqxcb.so, the app still doesnot start, but the error message changes:

    Failed to load platform plugin «xcb». Available platforms are:

    xcb

    How can this happen? How can platform plugin be available but can’t be loaded?

    fat's user avatar

    fat

    6,1355 gold badges44 silver badges68 bronze badges

    asked Jun 14, 2013 at 10:22

    locomotion's user avatar

    5

    Use ldd (man ldd) to show shared library dependencies. Running this on libqxcb.so

    .../platforms$ ldd libqxcb.so
    

    shows that xcb depends on libQt5DBus.so.5 in addition to libQt5Core.so.5 and libQt5Gui.so.5 (and many other system libs). Add libQt5DBus.so.5 to your collection of shared libs and you should be ready to move on.

    answered Aug 30, 2013 at 12:05

    Abe Mishler's user avatar

    Abe MishlerAbe Mishler

    6626 silver badges2 bronze badges

    8

    As was posted earlier, you need to make sure you install the platform plugins when you deploy your application. Depending on how you want to deploy things, there are two methods to tell your application where the platform plugins (e.g. platforms/plugins/libqxcb.so) are at runtime which may work for you.

    The first is to export the path to the directory through the QT_QPA_PLATFORM_PLUGIN_PATH variable.

    QT_QPA_PLATFORM_PLUGIN_PATH=path/to/plugins ./my_qt_app
    

    or

    export QT_QPA_PLATFORM_PLUGIN_PATH=path/to/plugins
    ./my_qt_app
    

    The other option, which I prefer is to create a qt.conf file in the same directory as your executable. The contents of which would be:

    [Paths]
    Plugins=/path/to/plugins
    

    More information regarding this can be found here and at using qt.conf

    Simon Warta's user avatar

    Simon Warta

    10.5k5 gold badges40 silver badges72 bronze badges

    answered Aug 22, 2014 at 0:03

    bossbarber's user avatar

    bossbarberbossbarber

    8426 silver badges10 bronze badges

    4

    I tried to start my binary, compiled with Qt 5.7, on Ubuntu 16.04 LTS where Qt 5.5 is preinstalled. It didn’t work.

    At first, I inspected the binary itself with ldd as was suggested here, and satisfied all «not found» dependencies. Then this notorious This application failed to start because it could not find or load the Qt platform plugin "xcb" error was thrown.

    How to resolve this in Linux

    Firstly you should create platforms directory where your binary is, because it is the place where Qt looks for XCB library. Copy libqxcb.so there. I wonder why authors of other answers didn’t mention this.

    Then you may want to run your binary with QT_DEBUG_PLUGINS=1 environment variable set to check which dependencies of libqxcb.so are not satisfied. (You may also use ldd for this as suggested in the accepted answer).

    The command output may look like this:

    me@xerus:/media/sf_Qt/Package$ LD_LIBRARY_PATH=. QT_DEBUG_PLUGINS=1 ./Binary
    QFactoryLoader::QFactoryLoader() checking directory path "/media/sf_Qt/Package/platforms" ...
    QFactoryLoader::QFactoryLoader() looking at "/media/sf_Qt/Package/platforms/libqxcb.so"
    Found metadata in lib /media/sf_Qt/Package/platforms/libqxcb.so, metadata=
    {
        "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
        "MetaData": {
            "Keys": [
                "xcb"
            ]
        },
        "className": "QXcbIntegrationPlugin",
        "debug": false,
        "version": 329472
    }
    
    
    Got keys from plugin meta data ("xcb")
    loaded library "/media/sf_Qt/Package/platforms/libqxcb.so"
    QLibraryPrivate::loadPlugin failed on "/media/sf_Qt/Package/platforms/libqxcb.so" : "Cannot load library /media/sf_Qt/Package/platforms/libqxcb.so: (/usr/lib/x86_64-linux-gnu/libQt5DBus.so.5: version `Qt_5' not found (required by ./libQt5XcbQpa.so.5))"
    This application failed to start because it could not find or load the Qt platform plugin "xcb"
    in "".
    
    Available platform plugins are: xcb.
    
    Reinstalling the application may fix this problem.
    Aborted (core dumped)
    

    Note the failing libQt5DBus.so.5 library. Copy it to your libraries path, in my case it was the same directory where my binary is (hence LD_LIBRARY_PATH=.). Repeat this process until all dependencies are satisfied.

    P.S. thanks to the author of this answer for QT_DEBUG_PLUGINS=1.

    answered Sep 27, 2016 at 12:58

    Neurotransmitter's user avatar

    NeurotransmitterNeurotransmitter

    5,9152 gold badges47 silver badges37 bronze badges

    3

    I tried the main parts of each answer, to no avail. What finally fixed it for me was to export the following environment variables:

    LD_LIBRARY_PATH=/usr/local/lib:~/Qt/5.9.1/gcc_64/lib
    QT_QPA_PLATFORM_PLUGIN_PATH=~/Qt/5.9.1/gcc_64/plugins/ 
    

    answered Aug 14, 2017 at 16:33

    Alan's user avatar

    AlanAlan

    5089 silver badges24 bronze badges

    2

    Ubuntu 16.04 64bit.
    I got the problem for apparently no reasons. The night before I watched a movie on my VideoLan instance, that night I would like to watch another one with VideoLan. VLC just didn’t want to run because of the error into the question.
    I google a bit and I found the solution it solved my problem: from now on, VLC is runnable just like before. The solution is this comand:

    sudo ln -sf /usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/ /usr/bin/

    I am not able to explain what are its consequencies, but I know it creates some missing symbolic link.

    answered Oct 19, 2016 at 19:04

    Francesco's user avatar

    FrancescoFrancesco

    5147 silver badges15 bronze badges

    2

    Since version 5, Qt uses a platform abstraction system (QPA) to abstract from the underlying platform.

    The implementation for each platform is provided by plugins. For X11 it is the XCB plugin. See Qt for X11 requirements for more information about the dependencies.

    answered Jun 14, 2013 at 10:47

    cloose's user avatar

    cloosecloose

    9185 silver badges18 bronze badges

    5

    There might be many causes to this problem. The key is to use

    export QT_DEBUG_PLUGINS=1
    

    before you run your Qt application. Then, inspect the output, which will point you to the direction of the error. In my case it was:

    Cannot load library /opt/nao/plugins/platforms/libqxcb.so: (/opt/nao/bin/../lib/libz.so.1: version `ZLIB_1.2.9' not found (required by /usr/lib/x86_64-linux-gnu/libpng16.so.16))
    

    But that is solved in different threads. See for instance https://stackoverflow.com/a/50097275/2408964.

    answered Feb 4, 2019 at 9:56

    untill's user avatar

    untilluntill

    1,43516 silver badges20 bronze badges

    1

    Probably this information will help. I was on Ubuntu 18.04 and when I tried to install Krita, using the ppa method, I got this error:

    This application failed to start because it could not find or load the Qt platform plugin «xcb» in «».

    Available platform plugins are: linuxfb, minimal, minimalegl, offscreen, wayland-egl, wayland, xcb.

    Reinstalling the application may fix this problem.

    Aborted

    I tried all the solutions that I found in this thread and other webs without any success.

    Finally, I found a post where the author mention that is possible to activate the debugging tool of qt5 using this simple command:

    export QT_DEBUG_PLUGINS=1
    

    After adding this command I run again krita I got the same error, however this time I knew the cause of that error.

    libxcb-xinerama.so.0: cannot open shared object file: No such file or directory.

    This error prevents to the «xcb» to load properly. So, the solution will be install the `libxcb-xinerama.so.0″ right? However, when I run the command:

    sudo apt install libxcb-xinerama
    

    The lib was already installed. Now what Teo? Well, then I used an old trick :) Yeah, that one --reinstall

    sudo apt install --reinstall libxcb-xinerama
    

    TLDR: This last command solved my problem.

    answered Jul 12, 2018 at 3:52

    Teocci's user avatar

    TeocciTeocci

    6,2731 gold badge43 silver badges44 bronze badges

    I ran into a very similar problem with the same error message. First, debug some by turning on the Qt Debug printer with the command line command:

    export QT_DEBUG_PLUGINS=1

    and rerun the application. For me this revealed the following:

    «Cannot load library /home/…/miniconda3/lib/python3.7/site-packages/PyQt5/Qt/plugins/platforms/libqxcb.so: (libxkbcommon-x11.so.0: cannot open shared object file: No such file or directory)»

    «Cannot load library /home/…/miniconda3/lib/python3.7/site-packages/PyQt5/Qt/plugins/platforms/libqxcb.so: (libxkbcommon-x11.so.0: cannot open shared object file: No such file or directory)»

    Indeed, I was missing libxkbcommon-x11.so.0 and libxkbcommon-x11.so.0. Next, check your architecture using dpkg from the linux command line. (For me, the command «arch» gave a different and unhelpful result)

    dpkg —print-architecture #result for me: amd64

    I then googled «libxkbcommon-x11.so.0 ubuntu 18.04 amd64», and likewise for libxkbcommon-x11.so.0, which yields those packages on packages.ubuntu.com. That told me, in retrospect unsurprisingly, I’m missing packages called libxkbcommon-x11-0 and libxkbcommon0, and that installing those packages will include the needed files, but the dev versions will not. Then the solution:

    sudo apt-get update

    sudo apt-get install libxkbcommon0

    sudo apt-get install libxkbcommon-x11-0

    Eugene Gr. Philippov's user avatar

    answered Mar 12, 2020 at 21:37

    Schroeder's user avatar

    SchroederSchroeder

    5896 silver badges17 bronze badges

    So, I spent about a day trying to figure out what was the issue; tried all the proposed solutions, but none of that worked like installing xcb libs or exporting Qt plugins folder. The solution that suggested to use QT_DEBUG_PLUGINS=1 to debug the issue didn’t provide me a direct insight like in the answer — instead I was getting something about unresolved symbols within Qt5Core.

    That gave me a hint, though: what if it’s trying to use different files from different Qt installations? On my machine I had standard version installed in /home/username/Qt/ and some local builds within my project that I compiled by myself (I have other custom built kits as well in other locations). Whenever I tried to use any of the kits (installed by Qt maintenance tool or built by myself), I would get an «xcb error».

    The solution was simple: provide the Qt path through CMAKE_PREFIX_PATH and not though Qt5_DIR as I did, and it solved the problem. Example:

    cmake .. -DCMAKE_PREFIX_PATH=/home/username/Qt/5.11.1/gcc_64

    answered Jul 18, 2018 at 16:37

    vicrucann's user avatar

    vicrucannvicrucann

    1,6951 gold badge24 silver badges33 bronze badges

    1

    I faced the same problem when after installing Viber. It had all required qt libraries in /opt/viber/plugins/.
    I checked dependencies of /opt/viber/plugins/platforms/libqxcb.so and found missing dependencies. They were libxcb-render.so.0, libxcb-image.so.0, libxcb-icccm.so.4, libxcb-xkb.so.1
    So I resolved my issue by installing missing packages with this libraries:

    apt-get install libxcb-xkb1 libxcb-icccm4 libxcb-image0 libxcb-render-util0

    answered Jun 17, 2016 at 19:38

    Sergey P. aka azure's user avatar

    2

    I like the solution with qt.conf.

    Put qt.conf near to the executable with next lines:

    [Paths]
    Prefix = /path/to/qtbase
    

    And it works like a charm :^)

    For a working example:

    [Paths]
    Prefix = /home/user/SDKS/Qt/5.6.2/5.6/gcc_64/
    

    The documentation on this is here: https://doc.qt.io/qt-5/qt-conf.html

    Eugene Gr. Philippov's user avatar

    answered Feb 7, 2018 at 8:44

    kyb's user avatar

    kybkyb

    6,7265 gold badges48 silver badges93 bronze badges

    2

    All you need to do is

    pip uninstall PyQt5 
    

    and

    conda install pyqt 
    

    Most of the problem of pyqt can be fixed by this simplest solution.

    answered Oct 15, 2021 at 0:35

    Jungwon Choi's user avatar

    1

    In my case, I needed to deploy two Qt apps on an Ubuntu virtualbox guest. One was command-line («app»), the other GUI_based («app_GUI»).

    I used «ldd app» to find out what the required libs are, and copied them
    to the Ubuntu guest.
    While the command-line executable «app» worked ok, the GUI-based executable crashed, giving
    the «Failed to load platform plugin «xcb» error.
    I checked ldd for libxcb.so, but this too had no missing dependencies.

    The problem seemed to be that while I did copy all the right libraries I accidentally had copied also libraries that were already present at the guest system.. meaning that (a) they were unnecessary to copy them in the first place and (b) worse, copying them produced incompatibilities between the install libraries.
    Worse still, they were undetectable by ldd like I said..

    The solution? Make sure that you copy libraries shown as missing by ldd and absolutely no extra libraries.

    answered Nov 28, 2015 at 14:25

    Giorgos Sfikas's user avatar

    Giorgos SfikasGiorgos Sfikas

    6591 gold badge7 silver badges19 bronze badges

    1

    In my case missing header files were the reason libxcb was not built by Qt. Installing them according to https://wiki.qt.io/Building_Qt_5_from_Git#Linux.2FX11 resolved the issue:

    yum install libxcb libxcb-devel xcb-util xcb-util-devel mesa-libGL-devel libxkbcommon-devel
    

    answered Apr 4, 2020 at 16:24

    Woltan's user avatar

    WoltanWoltan

    13.5k14 gold badges76 silver badges102 bronze badges

    1

    Folks trying to get this started on Ubuntu 20.04 please try to run this and see if this solves the problem. This worked for me

    sudo apt-get update -y
    sudo apt-get install -y libxcb-xinerama0
    

    answered Nov 24, 2021 at 12:40

    fatcook's user avatar

    fatcookfatcook

    9064 silver badges16 bronze badges

    I link all Qt stuff statically to the generic Linux builds of my open source projects. It makes life a bit easier. You just need to build static versions of Qt libraries first. Of course this cannot be applied to closed source software due to licensing issues. The deployment of Qt5 apps on Linux is currently a bit problematic, because Ubuntu 12.04, for example, doesn’t have Qt5 libraries in the package repositories.

    answered Dec 26, 2013 at 0:21

    juzzlin's user avatar

    juzzlinjuzzlin

    43.6k5 gold badges33 silver badges48 bronze badges

    I had this problem, and on a hunch I removed the Qt Configs from my environment. I.e.,

    rm -rf ~/.config/Qt*
    

    Then I started qtcreator and it reconfigured itself with the existing state of the machine. It no longer remembered where my projects were, but that just meant I had to browse to them «for the first time» again.

    But more importantly it built itself a coherent set of library paths, so I could rebuild and run my project executables again without the xcb or qxcb libraries going missing.

    answered Aug 31, 2018 at 15:41

    Blair Houghton's user avatar

    2

    I faced the same situation, but on a Ubuntu 20.04 VM.

    TL;DR: Check file permissions.

    What I did:

    • I copied the Qt libs required to /usr/local/lib/x86_64-linux-gnu/ and added it to LD_LIBRARY_PATH
    • I copied the platforms folder from Qt to my application directory and added it to QT_PLUGIN_PATH
    • I ran ldd on the executable and in the offending libqxcb.so (ldd libqxcb.so), and it complains about some dependencies although ldconfig listed them as found.
            linux-vdso.so.1 (0x00007ffee19af000)
        libQt5XcbQpa.so.5 => not found
        libfontconfig.so.1 => /lib/x86_64-linux-gnu/libfontconfig.so.1 (0x00007f7cb18fb000)
        libfreetype.so.6 => /lib/x86_64-linux-gnu/libfreetype.so.6 (0x00007f7cb183c000)
        libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f7cb1820000)
        libQt5Gui.so.5 => /usr/local/lib/x86_64-linux-gnu/libQt5Gui.so.5 (0x00007f7cb0fd4000)
        libQt5DBus.so.5 => not found
    
    • I used export QT_DEBUG_PLUGINS=1 for further info. It complains about missing files, although they are there.

    What I found:

    • For some reason, when copying to the VM through the shared folder the files permissions were not the correct ones.
    • Thus, I ran: sudo chmod 775 * on the libs and voilà.

    answered Sep 27, 2022 at 22:54

    ElectroQuanta's user avatar

    I solved the issue through this https://github.com/NVlabs/instant-ngp/discussions/300

    pip uninstall opencv-python
    pip install opencv-python-headless
    

    This seems to have been a problem with the cv2 Python package and how it loops in Qt

    answered Nov 9, 2022 at 6:14

    mr.loop's user avatar

    mr.loopmr.loop

    7805 silver badges17 bronze badges

    sudo ln -sf /usr/lib/….»adapt-it»…./qt5/plugins/platforms/ /usr/bin/

    It creates the symbolic link it’s missed. Good for QT ! Good for VLC !!

    answered Feb 2, 2017 at 2:06

    jujuuj's user avatar

    3

    Новые и опытные пользователи Linux могут сталкиваться с ошибкой error loading shared libraries во время запуска программ, также с ней могут сталкиваться программисты и все желающие компилировать программное обеспечение в своей системе. Эта ошибка в дословном переводе означает что возникла проблема во время загрузки общей библиотеки. О том что такое библиотеки и зачем они нужны вы можете узнать из статьи библиотеки Linux.

    В этой же статье мы рассмотрим что значит ошибка error while loading shared libraries более подробно, а главное, как ее решить.

    Даже если вы не компилируете свои программы, то вы можете увидеть ошибку error while loading shared libraries: имя_библиотеки: cannot open shared object file: No such file or directory достаточно часто во время установки новых программ не через пакетный менеджер или программ, предназначенных для другого дистрибутива. Как я уже говорил, она возникает потому, что система не может найти библиотеку.

    А вот почему ее нельзя найти и загрузить, это уже интересно. Этому может быть несколько причин:

    • Библиотека не установлена в системе;
    • Библиотека установлена, но неизвестно куда;
    • Библиотека установлена правильно, но имеет не ту версию.

    При решении проблемы мы будем руководствоваться именно этими причинами и пытаться их решить.

    Как исправить ошибку?

    1. Библиотека не установлена

    Первый вариант, тут все понятно, библиотеки просто нет в системе, поэтому мы и получаем такую ошибку. Верный способ ее решения — просто найти пакет библиотеки с помощью пакетного менеджера и установить ее. Обычно, пакеты с библиотеками называются так же, как и сами библиотеки с префиксом lib.

    Например, если нам не хватает библиотеки libfuse2.so, то мы можем найти ее в Ubuntu такой командой:

    sudo apt search libfuse2

    Затем осталось только установить ее:

    sudo apt install libfuse2

    Если перед вами стоит задача собрать программу из исходников, то вам понадобится не только установить саму библиотеку, но и заголовочные файлы для нее:

    sudo apt install libfuse-dev

    И так для любой библиотеки. Но это не всегда помогает.

    2. Библиотека находится не в том каталоге

    Бывает что библиотека установлена, мы установили ее или она поставлялась вместе с программой, но ошибка как была, так и есть. Причиной этому может быть то, что загрузчик Linux не может найти библиотеку.

    Поиск библиотек выполняется по всех папках, которые указаны в конфигурационных файлах /etc/ld.conf.d/. По умолчанию, это такие каталоги, как /usr/lib, /lib, /usr/lib64, /lib64. Если библиотека установлена в другой каталог, то, возможно, это и есть причина проблемы.

    Вы можете посмотреть какие библиотеки сейчас доступны загрузчику с помощью команды:

    ldconfig -p

    Найти, где находится ваша библиотека можно с помощью команды locate. Например, нас интересует библиотека librtfreader.so:

     locate librtfreader

    Теперь мы знаем, что она находится по адресу /opt/kingsoft/wps-office/office6/. А значит, для работы программы необходимо сделать чтобы загрузчик библиотек ее видел. Для этого можно добавить путь в один из файлов /etc/ld.so.conf.d/ или же в переменную LD_LIBRARY_PATH:

    export LD_LIBRARY_PATH=/opt/kingsoft/wps-office/office6/

    Опять же, так вы можете поставить с любой библиотекой, которая взывает ошибку. Еще один более простой метод — это просто создать символическую ссылку на нужную библиотеку в правильной папке:

    ln -s /opt/kingsoft/wps-office/office6/librtfreader.so /usr/lib/librtfreader.so

    3. Неверная версия библиотеки

    Эта причина ошибки довольно часто встречается при использовании программ не для вашего дистрибутива. Каждая библиотека имеет дополнительную версию, так называемую ревизию, которая записывается после расширения .so. Например, libav.so.1. Так вот, номер версии меняется всякий раз, когда в библиотеку вносятся какие-либо исправления.

    Часто возникает ситуация, когда в одном дистрибутиве программа собирается с зависимостью от библиотеки, например, libc.so.1, а в другом есть только libc.so.2. Отличия в большинстве случаев здесь небольшие и программа могла бы работать на второй версии библиотеки. Поэтому мы можем просто создать символическую ссылку на нее.

    Например, библиотеки libusb-1.0.so.1 нет. Но зато есть libusb-1.0.so.0.1, и мы можем ее использовать:

    Для этого просто создаем символическую ссылку на библиотеку:

    sudo ln -s /usr/lib/libusb-1.0.so.0.1 /usr/lib/libusb-1.0.so.1

    В большинстве случаев программа не заметит подмены и будет работать, как и ожидалось. Также для решения этой проблемы можно попытаться найти нужную версию библиотеки в интернете для своей архитектуры и поместить ее в папку /usr/lib/ или /usr/lib64/. Но после этого желательно обновить кэш:

    sudo ldconfig

    Выводы

    В этой статье мы рассмотрели почему возникает ошибка Error while loading shared libraries, а также как ее решить. В большинстве случаев проблема решается довольно просто и вы получите работоспособную программу. Надеюсь, эта информация была полезной для вас.

    Creative Commons License

    Статья распространяется под лицензией Creative Commons ShareAlike 4.0 при копировании материала ссылка на источник обязательна .

    Иногда обработка в Agisoft Metashape завершается сообщением об ошибке. В этой статье описаны наиболее распространенные ошибки, возникающие при работе в Linux, и способы решения этих проблем:

    • Проблема с libc
    • Проблема с OpenGL
    • Проблема при импорте видео
    • Linux-зависимости

    Проблема с libc

    Сообщение об ошибке:

    can't launch, errors like "version 'CLIBC_2.15' not found"
    or "version 'GLIBCXX_3.4.20' not found"

    Причина: для Metashape требуется как минимум glibc 2.19, поэтому:   

    • Ubuntu: не ниже 16.04 LTS xenial
    • CentOS: требуется как минимум CentOS 8   

    Общий способ проверить версию libc через терминал: 

    ldd —version 

    Проблема с OpenGL

    Сообщение об ошибке:

    can't launch with GUI, erros like "QXcbIntegration: Cannot create platform OpenGL context, neither GLX nor EGL are enabled" and "QOpenGLWidget: Failed to create context" 

    Причина:  Metashape требует как минимум OpenGL 2.0+ (т.е. требуются шейдеры)  

    Решение: Проверьте вывод следующей команды в терминале: 

    glxinfo | grep version

    Обратите внимание на строку «версии OpenGL».

    Удаленный доступ к GUI через SSH не поддерживается — вместо этого рекомендуется использовать TurboVNC для удаленного доступа. Ознакомьтесь с рекомендациями здесь: https://github.com/agisoft-llc/cloud-scripts.

    Проблема при импорте видео

    Сообщение об ошибке:

    video doesn't playing
    Question: please provide errors from terminal (from which Metashape was launched), and what is the output of "QT_DEBUG_PLUGINS=1 ./metashape.sh"?

    Вы можете получить различные текстовые сообщения об ошибках для этой проблемы. Ниже мы описываем примеры с распространенными сообщениями об ошибках и решениями для каждого случая:

    Пример 1: 

    Failed to load plugin ‘/usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstlibav.so’: /usr/lib/x86_64-linux-gnu/libhogweed.so.4: undefined symbol: __gmpn_cnd_sub_n

    В Ubuntu перезапустите Metashape с помощью следующей команды: 

    LD_PRELOAD=’/usr/lib/x86_64-linux-gnu/libgmp.so.10′ /path/to/metashape.sh 

    В CentOS перезапустите Metashape с помощью следующей команды:

    LD_PRELOAD=’/usr/lib64/libgmp.so.10′ /path/to/metashape.sh 

    Для постоянного исправления добавьте строку LD_PRELOAD с ключевым словом export в файле metashape.sh (как это уже сделано с переменной LD_LIBRARY_PATH ).

    Пример 2: 

    Warning: «No decoder available for type ‘video/x-h264, stream-format=(string)avc, alignment=(string)au, level=(string)4.1,
    profile=(string)high, codec_data=buffer)01640029ffe1003827640029ac34c802a40bfb016a020202800001f48000753074
    300015752000055d4a5de5c6860002aea40000aba94bbcb87c22114e00000001000428ee3830, width=(int)2704, height=(int)1520, framerate=(fraction)30000/1001, pixel-aspect-ratio=(fraction)1/1′.
    » Error: «Your GStreamer installation is missing a plug-in.»

    В Ubuntu 20.04 и 21.04 выполните следующие команды в терминале, чтобы установить отсутствующие зависимости:

    sudo add-apt-repository universe
    sudo apt install gstreamer1.0-libav
     

    Пример 3:

    libxcb-icccm.so.4: cannot open shared object file: No such file or directory

    В CentOS 8 выполните в терминале следующую команду, чтобы установить отсутствующие зависимости: 

    sudo yum install xcb-util-wm xcb-util-image xcb-util-keysyms xcb-util-renderutil 

    Linux-зависимости

    Сообщение об ошибке:

    can't launch with error "libgomp.so.1: cannot open shared object file"

    Решение:  установить libgomp. 

    В CentOS: 

    yum install libgomp

    В Ubuntu: 

    apt install libgomp1

    ————————————

    Сообщение об ошибке:

    can't launch with error "libquadmath.so.0: cannot open shared object file"

    Решение: установите libquadmath.

    в CentOS: 

    yum install libquadmath

    в Ubuntu 20.04: 

    «apt install libquadmath0» 

    ————————————

    Сообщение об ошибке:

    can't launch "./metashape.sh" with error "This application failed to start because it could not find or load the Qt platform plugin"

    Проверьте вывод следующей команды в терминале:

    QT_DEBUG_PLUGINS=1 ./metashape.sh  

    Возможная причина: в Ubuntu 16.04, 20.04 и 20.10 не найден libxcb-xinerama.so.0 

    Решение:

    apt install libxcb-xinerama0 

    ————————————

    Сообщение об ошибке:

    not-rich python console (due to 'Failed to import qtconsole.inprocess: libffi.so.6: cannot open shared object file')

    Решение: в Ubuntu 20.04 выполните следующие команды в терминале: 

    wget http://mirrors.kernel.org/ubuntu/pool/main/libf/libffi/libffi6_3.2.1-8_amd64.deb

    apt install ./libffi6_3.2.1-8_amd64.deb

    (дополнительную информацию можно узнать в статье StackOverflow)

    ————————————

    Сообщение об ошибке:

    can't launch "./metashape.sh" with error "error while loading shared libraries: libGLU.so.1"

    Решение: установите mesa-libglu.

    Например, в CentOS 8: 

    yum install mesa-libGLU 

    ————————————

    Сообщение об ошибке:

    can't launch "./metashape.sh" with error "symbol lookup error: /lib64/libhogweed.so.4: undefined symbol: __gmpn_cnd_sub_n"

    Решение: удалите lib/libgmp.so.10 в комплекте с Metashape (дополнительную информацию см. в статье GitHub).

    Five months ago I upgraded from Ubuntu 16.04 to Ubuntu 18.04. Following this upgrade several Qt applications no longer worked for me. Instead of starting up I would see errors such as:

    $ git cola &
    [1] 9534
    $ This application failed to start because it could not find or load the Qt platform plugin "xcb"
    in "".
    
    Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, xcb.
    
    Reinstalling the application may fix this problem.
    error: git-cola died of signal 6
    ^C
    [1]+ Exit 134 git cola
    

    (I considered asking this on Ask Ubuntu as that is my operating system but it could be a wider Qt environment on Linux issue so I shall start here. This is not git-cola specific, as I see a very similar message on other applications.)

    Several posts on the www suggested that a related package might be missing but so far I have not been able to identify what. Running with export QT_DEBUG_PLUGINS=1 set gives more debug information but no answers as far as I can work out:

    $ export QT_DEBUG_PLUGINS=1
    $ git-cola
    QFactoryLoader::QFactoryLoader() checking directory path "/usr/bin/platforms" ...
    QFactoryLoader::QFactoryLoader() looking at "/usr/bin/platforms/libqeglfs.so"
    Found metadata in lib /usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqeglfs.so, metadata=
    {
        "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
        "MetaData": {
            "Keys": [
                "eglfs"
            ]
        },
        "className": "QEglFSIntegrationPlugin",
        "debug": false,
        "version": 329989
    }
    
    
    ...<trimming out the rest of the OK stuff until we reach>...
    
    
    Got keys from plugin meta data ("xcb")
    Cannot load library /usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqxcb.so: (/usr/lib/x86_64-linux-gnu/libQt5XcbQpa.so.5: symbol _ZNK15QPlatformWindow15safeAreaMarginsEv version Qt_5_PRIVATE_API not defined in file libQt5Gui.so.5 with link time reference)
    QLibraryPrivate::loadPlugin failed on "/usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqxcb.so" : "Cannot load library /usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqxcb.so: (/usr/lib/x86_64-linux-gnu/libQt5XcbQpa.so.5: symbol _ZNK15QPlatformWindow15safeAreaMarginsEv version Qt_5_PRIVATE_API not defined in file libQt5Gui.so.5 with link time reference)"
    This application failed to start because it could not find or load the Qt platform plugin "xcb"
    in "".
    
    Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, xcb.
    
    Reinstalling the application may fix this problem.
    Aborted (core dumped)
    

    When I run the application with ldd or check the package which should be providing xcb all seems to be present and correct.

    $ env LANG=C ldd /usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqxcb.so
        linux-vdso.so.1 (0x00007ffc489e3000)
        libQt5XcbQpa.so.5 => /usr/lib/x86_64-linux-gnu/libQt5XcbQpa.so.5 (0x00007fd3090c8000)
        libQt5Gui.so.5 => /lib/x86_64-linux-gnu/libQt5Gui.so.5 (0x00007fd308919000)
        libQt5Core.so.5 => /lib/x86_64-linux-gnu/libQt5Core.so.5 (0x00007fd3081de000)
        libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007fd307e50000)
        libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fd307a5f000)
        libglib-2.0.so.0 => /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0 (0x00007fd307749000)
        libfontconfig.so.1 => /usr/lib/x86_64-linux-gnu/libfontconfig.so.1 (0x00007fd307504000)
        libfreetype.so.6 => /usr/lib/x86_64-linux-gnu/libfreetype.so.6 (0x00007fd307250000)
        libQt5DBus.so.5 => /usr/lib/x86_64-linux-gnu/libQt5DBus.so.5 (0x00007fd306fc6000)
        libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007fd306da7000)
        libX11-xcb.so.1 => /usr/lib/x86_64-linux-gnu/libX11-xcb.so.1 (0x00007fd306ba5000)
        libX11.so.6 => /usr/lib/x86_64-linux-gnu/libX11.so.6 (0x00007fd30686c000)
        libXi.so.6 => /usr/lib/x86_64-linux-gnu/libXi.so.6 (0x00007fd30665c000)
        libSM.so.6 => /usr/lib/x86_64-linux-gnu/libSM.so.6 (0x00007fd306454000)
        libICE.so.6 => /usr/lib/x86_64-linux-gnu/libICE.so.6 (0x00007fd306239000)
        libxcb-xkb.so.1 => /usr/lib/x86_64-linux-gnu/libxcb-xkb.so.1 (0x00007fd30601d000)
        libxcb-render-util.so.0 => /usr/lib/x86_64-linux-gnu/libxcb-render-util.so.0 (0x00007fd305e19000)
        libxcb-render.so.0 => /usr/lib/x86_64-linux-gnu/libxcb-render.so.0 (0x00007fd305c0c000)
        libxcb-sync.so.1 => /usr/lib/x86_64-linux-gnu/libxcb-sync.so.1 (0x00007fd305a05000)
        libxcb-xfixes.so.0 => /usr/lib/x86_64-linux-gnu/libxcb-xfixes.so.0 (0x00007fd3057fd000)
        libxcb-xinerama.so.0 => /usr/lib/x86_64-linux-gnu/libxcb-xinerama.so.0 (0x00007fd3055fa000)
        libxcb-randr.so.0 => /usr/lib/x86_64-linux-gnu/libxcb-randr.so.0 (0x00007fd3053ea000)
        libxcb-image.so.0 => /usr/lib/x86_64-linux-gnu/libxcb-image.so.0 (0x00007fd3051e5000)
        libxcb-shm.so.0 => /usr/lib/x86_64-linux-gnu/libxcb-shm.so.0 (0x00007fd304fe2000)
        libxcb-keysyms.so.1 => /usr/lib/x86_64-linux-gnu/libxcb-keysyms.so.1 (0x00007fd304ddf000)
        libxcb-icccm.so.4 => /usr/lib/x86_64-linux-gnu/libxcb-icccm.so.4 (0x00007fd304bda000)
        libxcb.so.1 => /usr/lib/x86_64-linux-gnu/libxcb.so.1 (0x00007fd3049b2000)
        libxcb-shape.so.0 => /usr/lib/x86_64-linux-gnu/libxcb-shape.so.0 (0x00007fd3047ae000)
        libxkbcommon-x11.so.0 => /usr/lib/x86_64-linux-gnu/libxkbcommon-x11.so.0 (0x00007fd3045a6000)
        libxkbcommon.so.0 => /usr/lib/x86_64-linux-gnu/libxkbcommon.so.0 (0x00007fd304367000)
        libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007fd303fc9000)
        libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007fd303db1000)
        libGL.so.1 => /usr/lib/x86_64-linux-gnu/libGL.so.1 (0x00007fd303b25000)
        libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007fd303908000)
        libicui18n.so.56 => /lib/x86_64-linux-gnu/libicui18n.so.56 (0x00007fd30346f000)
        libicuuc.so.56 => /lib/x86_64-linux-gnu/libicuuc.so.56 (0x00007fd3030b7000)
        libicudata.so.56 => /lib/x86_64-linux-gnu/libicudata.so.56 (0x00007fd3016d4000)
        libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007fd3014d0000)
        libgthread-2.0.so.0 => /usr/lib/x86_64-linux-gnu/libgthread-2.0.so.0 (0x00007fd3012ce000)
        /lib64/ld-linux-x86-64.so.2 (0x00007fd3095ce000)
        libpcre.so.3 => /lib/x86_64-linux-gnu/libpcre.so.3 (0x00007fd30105c000)
        libexpat.so.1 => /lib/x86_64-linux-gnu/libexpat.so.1 (0x00007fd300e2a000)
        libpng16.so.16 => /usr/lib/x86_64-linux-gnu/libpng16.so.16 (0x00007fd300bf8000)
        libdbus-1.so.3 => /lib/x86_64-linux-gnu/libdbus-1.so.3 (0x00007fd3009ab000)
        libXext.so.6 => /usr/lib/x86_64-linux-gnu/libXext.so.6 (0x00007fd300799000)
        libuuid.so.1 => /lib/x86_64-linux-gnu/libuuid.so.1 (0x00007fd300592000)
        libbsd.so.0 => /lib/x86_64-linux-gnu/libbsd.so.0 (0x00007fd30037d000)
        libxcb-util.so.1 => /usr/lib/x86_64-linux-gnu/libxcb-util.so.1 (0x00007fd300177000)
        libXau.so.6 => /usr/lib/x86_64-linux-gnu/libXau.so.6 (0x00007fd2fff73000)
        libXdmcp.so.6 => /usr/lib/x86_64-linux-gnu/libXdmcp.so.6 (0x00007fd2ffd6d000)
        libGLX.so.0 => /usr/lib/x86_64-linux-gnu/libGLX.so.0 (0x00007fd2ffb3c000)
        libGLdispatch.so.0 => /usr/lib/x86_64-linux-gnu/libGLdispatch.so.0 (0x00007fd2ff886000)
        libsystemd.so.0 => /lib/x86_64-linux-gnu/libsystemd.so.0 (0x00007fd2ff602000)
        librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007fd2ff3fa000)
        liblzma.so.5 => /lib/x86_64-linux-gnu/liblzma.so.5 (0x00007fd2ff1d4000)
        liblz4.so.1 => /usr/lib/x86_64-linux-gnu/liblz4.so.1 (0x00007fd2fefb8000)
        libgcrypt.so.20 => /lib/x86_64-linux-gnu/libgcrypt.so.20 (0x00007fd2fec9d000)
        libgpg-error.so.0 => /lib/x86_64-linux-gnu/libgpg-error.so.0 (0x00007fd2fea88000)
    

    Several of the applcations I have issues with offer a seperate container or packaging solution such as snap or flatpak. While this provides me with a workaround in many cases, I would still like to be able to resolve the issue with my Qt environment.

    libxcb-xinerama.so.0 missing #52

    Comments

    HappyLer commented May 29, 2017 •

    Hello,
    I am trying to use V 5.0 Linux on Ubuntu 16.04 LTS. When run from terminal I get the following error:
    ./ArenaTracker: error while loading shared libraries: libxcb-xinerama.so.0: cannot open shared object file: No such file or directory

    Edit: Just installed it via apt-get install libxcb-xinerama and it works now. Maybe the binary should check for dependencies and notifiy the user if something is missing.

    The text was updated successfully, but these errors were encountered:

    supertriodo commented May 29, 2017

    I’d suggest linux users to download the AppImage.
    I’ll have to change it the name to specify better that is a linux binary.

    The AppImage won’t give you dependency problems. If you still want to use the linux static build, you can install the missing dependencies:

    sudo apt-get install libxcb-xinerama0

    supertriodo commented May 29, 2017

    Didn’t you need to install libpng12?

    nicolasvillavicencio commented May 30, 2017 •

    This just happen to me and its solved when installed libxcb-xinerama0 what is odd is the problem started when changed the option transparency to Framed and restarted AT

    supertriodo commented May 30, 2017

    Wow that’s really weird. Dependencies shouldn’t be conditional.

    Footer

    © 2023 GitHub, Inc.

    You can’t perform that action at this time.

    You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.

    Источник

    Error while loading shared libraries libxcb xinerama so 0

    I built Qt for static compilation on Ubuntu using the configuration:

    I then built a statically compiled Qt application, but when I run the application on a clean Ubuntu Linux installation I get the error:

    Is there a way to build my Qt application so that this library will be statically compiled into the executable?

    @ScottLupton You would need a static version of this library and libraries this one needs

    I don’t usually use Linux so I’m having trouble finding what I need to install to get the static version.

    I installed installed the libxcb-xinerama packages and some other xinerama packages I found search the repository:

    Unfortunately that didn’t solve the problem.

    Looking at the output from configure I noticed some libraries were set to load at runtime:

    I therefore added -xrandr -xcursor -xfixes parameters to configure, after which it changed to:

    I then ran configure again also adding -xnerama, after which I got:

    I thought that would be the solution, but after rebuilding Qt and my application I still get: error while loading shared libraries: libxcb-xinerama.so

    I also tried adding this to the project’s .pro file:

    But that also didn’t solve the problem.

    How do I statically compile the xcb-xinerama library?

    I’ve been trying to statically compile my application on Linux for a week, but I’m still no closer to a solution.

    Getting nothing done for a week has been a real nightmare. I think it’s time to move on from the hard liqueur and hit the crack cocaine 🙂

    If anyone can point me in the right general direction I’d be grateful.

    Hi and welcome to devnet,

    IIRC, when presented with both option the linker uses the shared library. Note that if you don’t need Xinerama support for your application you can also disable the option.

    Also, don’t forget the implication about using a static build of Qt.

    Note that if you don’t need Xinerama support for your application you can also disable the option.

    Thanks for the suggestion. I ran configure with -no-xinerama and checked the output to confirm it was disabled:

    I then built Qt and built my application, but it still said «error while loading shared libraries: libxcb-xinerama.so»

    I just tried another solution, which was to run configure with -qt-xcb so it uses the xcb libraries bundled with Qt, and that finally solved the problem. It’s very late now so I’ll read about -qt-xcb more when I got up tomorrow.

    Before I mark this as solved I best ask, are there any possible issues with using -qt-xcb?

    Thanks again for the help.

    No issue in using it.

    The only thing to take into account is that any update to the Qt provided xcb library won’t happen until next release of Qt (unless you’re building from the latest git revision) while your system xcb will follow your distribution updates.

    That’s a tradeoff that only you can decide upon.

    @SGaist OK, but how to disable it?

    After update 5.15 (the removed -qt-xcb). Static Qt builds do not run without installing additional packages.
    Installation of additional packages makes the purpose of static linking pointless. Qt Architects don’t understand it?

    How to build empty STATIC (without libs in boundled directory) Qt application and run it on clean Ubuntu 20 system WITHOUT installation any additional packages?
    It’s impossible for now.

    Qt Architects don’t understand it?

    Please read https://forum.qt.io/topic/113070/qt-code-of-conduct before writing such posts.
    And also please realize that this is user forum mainly driven by volunteers, no need to use such language.

    @jsulm
    My claim is not addressed to the forum participants of course.
    It’s addressed to the product managers directly. Perhaps there was a misunderstanding becouse of my lame English, sorry. I don’t want to sound rude.
    One need to understand that we pay money for the ability to distribute our software with a static link. This option is almost broken even for empty projects.
    The situation (static link) gets worse from version to version.

    If you have a license than contact the Qt Company directly with your issue, as @jsulm wrote, this is a volunteer driven user forum.

    As for your issue: Qt 5.15 dropped one of xcb in-tree library because all the officially supported distributions are providing it. All the in-tree included external libraries require work to keep up to date it terms of version as well as security which is work already handled by distribution hence dropping.
    If you want a really fully static Qt, you would also need to provide a static OpenSSL, MySQL, etc.

    If you have a license than contact the Qt Company directly with your issue

    Unforunatly, it does not work for the «static build» issues.

    I’ve spent many weeks doing Qt static builds for linux and macOS, including OpenSSL. Before version Qt 5.15 it was very tricky but possible (except some special issues with ICU). Application run without installation packages and any additionl libs on Ubuntu 16 and higher.

    But now, they removed -qt-xcb flag ( https://doc.qt.io/qt-5/linux-requirements.html ) and the number of dependencies has grown dramatically.

    Below I will talk about an empty Qt application only. Without OpenSSL, curl, etc.

    Here is dependency list of the empty app run at Ubuntu 20. Build station: static Qt 5.15 and ubuntu 16.

    Of cource it does not start.

    So, I need to build package or installer. Here is dependency list of the not empty real app. Build station: static Qt 5.14.2 and ubuntu 16.

    It’s not perfect, but it’s acceptable and it works on many systems.

    Источник

    Helpdesk Portal

    Устранение неполадок при работе с Metashape в Linux Печать

    Изменено: Сб, 26 Мар, 2022 at 3:58 PM

    Иногда обработка в Agisoft Metashape завершается сообщением об ошибке. В этой статье описаны наиболее распространенные ошибки, возникающие при работе в Linux, и способы решения этих проблем:

    Проблема с libc

    Сообщение об ошибке:

    Причина: для Metashape требуется как минимум glibc 2.19, поэтому:

    • Ubuntu: не ниже 16.04 LTS xenial
    • CentOS: требуется как минимум CentOS 8

    Общий способ проверить версию libc через терминал:

    Проблема с OpenGL

    Сообщение об ошибке:

    Причина: Metashape требует как минимум OpenGL 2.0+ (т.е. требуются шейдеры)

    Решение: Проверьте вывод следующей команды в терминале:

    glxinfo | grep version

    Обратите внимание на строку «версии OpenGL».

    Удаленный доступ к GUI через SSH не поддерживается — вместо этого рекомендуется использовать TurboVNC для удаленного доступа. Ознакомьтесь с рекомендациями здесь: https://github.com/agisoft-llc/cloud-scripts .

    Проблема при импорте видео

    Сообщение об ошибке:

    Вы можете получить различные текстовые сообщения об ошибках для этой проблемы. Ниже мы описываем примеры с распространенными сообщениями об ошибках и решениями для каждого случая:

    Failed to load plugin ‘/usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstlibav.so’: /usr/lib/x86_64-linux-gnu/libhogweed.so.4: undefined symbol: __gmpn_cnd_sub_n

    В Ubuntu перезапустите Metashape с помощью следующей команды:

    В CentOS перезапустите Metashape с помощью следующей команды :

    Для постоянного исправления добавьте строку LD_PRELOAD с ключевым словом export в файле metashape.sh (как это уже сделано с переменной LD_LIBRARY_PATH ).

    Warning: «No decoder available for type ‘video/x-h264, stream-format=(string)avc, alignment=(string)au, level=(string)4.1,
    profile=(string)high, codec_data=buffer)01640029ffe1003827640029ac34c802a40bfb016a020202800001f48000753074
    300015752000055d4a5de5c6860002aea40000aba94bbcb87c22114e00000001000428ee3830, width=(int)2704, height=(int)1520, framerate=(fraction)30000/1001, pixel-aspect-ratio=(fraction)1/1′.
    » Error: «Your GStreamer installation is missing a plug-in.»

    В Ubuntu 20.04 и 21.04 выполните следующие команды в терминале, чтобы установить отсутствующие зависимости:

    sudo add-apt-repository universe
    sudo apt install gstreamer1.0-libav

    libxcb-icccm.so.4: cannot open shared object file: No such file or directory

    В CentOS 8 выполните в терминале следующую команду, чтобы установить отсутствующие зависимости:

    sudo yum install xcb-util-wm xcb-util-image xcb-util-keysyms xcb-util-renderutil

    Linux-зависимости

    Сообщение об ошибке:

    Решение: установить libgomp.

    yum install libgomp

    apt install libgomp1

    Сообщение об ошибке:

    Решение: установите libquadmath.

    yum install libquadmath

    «apt install libquadmath0»

    Сообщение об ошибке:

    Проверьте вывод следующей команды в терминале:

    Возможная причина: в Ubuntu 16.04, 20.04 и 20.10 не найден libxcb-xinerama.so.0

    apt install libxcb-xinerama0

    Сообщение об ошибке:

    Решение: в Ubuntu 20.04 выполните следующие команды в терминале:

    apt install ./libffi6_3.2.1-8_amd64.deb

    ( дополнительную информацию можно узнать в статье StackOverflow )

    Источник

    libxcb-xinput.so.0: невозможно открыть файл общих объектов: нет такого файла или каталога

    Я пытался установить Linux версию NovAtel Convert(OEM6/OEM7) 64-Bit программное обеспечение по этой ссылке на моем компьютере с Ubuntu 16.04.

    Это следующая ошибка, которую я получил:

    Это выглядит libxcb-xinput-dev недоступен в Ubuntu 16.04 xenial согласно этой странице.

    Кто-нибудь знает, как исправить эту проблему?

    3 ответа

    Вы можете переустановить библиотеку следующим образом:

    У меня была такая же ошибка при установке qt6, и переустановка библиотеки решила проблему.

    У меня была такая же проблема с Ubuntu 18.04. Мое решение запускало команду sudo apt-get install libxcb-xinput0 установить недостающий пакет.

    Используйте NovAtel Convert 2.5.0 в Ubuntu 16.04

    Используйте NovAtel Convert версии 2.5.0, это последняя версия Convert, предназначенная для использования с Ubuntu 16.04.

    Версии Convert после 2.5.0 были проверены для Ubuntu 18.04 и зависят от разных разделяемых библиотек.

    Как получить NovAtel Convert 2.5.0

    Вы можете загрузить более старые версии NovAtel Convert, перейдя по ссылке:

    https://files.novatel.com > Программное обеспечение> Конвертировать> 2.x

    Или вы можете связаться с отделом разработки приложений NovAtel для получения поддержки, перейдя по адресу: https://novatel.com/contactus/contact-support

    Заставляя его работать 16.04

    Возможно скопировать все необходимые разделяемые библиотеки из среды 18.04, но это не рекомендуется, потому что вам придется копировать файлы в те места, где Connect ожидает их расположения, которые уже заполнены новыми библиотеками с точно такие же имена файлов, в некоторых случаях 16.04.

    Возможно, эти изменения применимы только к Convert, используя chroot jail или union fs. Но похоже, что для поддержки двух LTS назад потребовалось много усилий.

    Запуск виртуальной машины для 18.04 может быть лучшим подходом, если вы застряли на 16.04.

    Источник

    Понравилась статья? Поделить с друзьями:
  • Error while loading shared libraries libwbclient so 0
  • Error while loading shared libraries libtinfo so 6
  • Error while loading shared libraries libtiff so 3
  • Error while loading shared libraries libstdc so 6
  • Error while loading shared libraries libssl so