Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. Can't get Qt to work on Ubuntu
Forum Updated to NodeBB v4.3 + New Features

Can't get Qt to work on Ubuntu

Scheduled Pinned Locked Moved Unsolved Installation and Deployment
5 Posts 4 Posters 856 Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    arad2456
    wrote on last edited by arad2456
    #1

    Hey everyone, I am trying to get Qt working in Ubuntu of windows, but I can't get it done. I downloaded the version 5.12.12. The message I get is:
    qt.qpa.xcb: could not connect to display dev:0
    qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" 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, xcb.
    Aborted (core dumped)

    I know there are many solutions for that on the internet, but they didn't work for me, which is why I am asking here. When I run "export QT_DEBUG_PLUGINS=1" I get:
    QFactoryLoader::QFactoryLoader() checking directory path "/usr/lib/x86_64-linux-gnu/qt5/plugins/platforms" ...
    QFactoryLoader::QFactoryLoader() looking at "/usr/lib/x86_64-linux-gnu/qt5/plugins/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"
    ]
    },
    "archreq": 0,
    "className": "QEglFSIntegrationPlugin",
    "debug": false,
    "version": 330752
    }

    Got keys from plugin meta data ("eglfs")
    QFactoryLoader::QFactoryLoader() looking at "/usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqlinuxfb.so"
    Found metadata in lib /usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqlinuxfb.so, metadata=
    {
    "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
    "MetaData": {
    "Keys": [
    "linuxfb"
    ]
    },
    "archreq": 0,
    "className": "QLinuxFbIntegrationPlugin",
    "debug": false,
    "version": 330752
    }

    Got keys from plugin meta data ("linuxfb")
    QFactoryLoader::QFactoryLoader() looking at "/usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqminimal.so"
    Found metadata in lib /usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqminimal.so, metadata=
    {
    "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
    "MetaData": {
    "Keys": [
    "minimal"
    ]
    },
    "archreq": 0,
    "className": "QMinimalIntegrationPlugin",
    "debug": false,
    "version": 330752
    }

    Got keys from plugin meta data ("minimal")
    QFactoryLoader::QFactoryLoader() looking at "/usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqminimalegl.so"
    Found metadata in lib /usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqminimalegl.so, metadata=
    {
    "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
    "MetaData": {
    "Keys": [
    "minimalegl"
    ]
    },
    "archreq": 0,
    "className": "QMinimalEglIntegrationPlugin",
    "debug": false,
    "version": 330752
    }

    Got keys from plugin meta data ("minimalegl")
    QFactoryLoader::QFactoryLoader() looking at "/usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqoffscreen.so"
    Found metadata in lib /usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqoffscreen.so, metadata=
    {
    "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
    "MetaData": {
    "Keys": [
    "offscreen"
    ]
    },
    "archreq": 0,
    "className": "QOffscreenIntegrationPlugin",
    "debug": false,
    "version": 330752
    }

    Got keys from plugin meta data ("offscreen")
    QFactoryLoader::QFactoryLoader() looking at "/usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqvnc.so"
    Found metadata in lib /usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqvnc.so, metadata=
    {
    "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
    "MetaData": {
    "Keys": [
    "vnc"
    ]
    },
    "archreq": 0,
    "className": "QVncIntegrationPlugin",
    "debug": false,
    "version": 330752
    }

    Got keys from plugin meta data ("vnc")
    QFactoryLoader::QFactoryLoader() looking at "/usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqxcb.so"
    Found metadata in lib /usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqxcb.so, metadata=
    {
    "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
    "MetaData": {
    "Keys": [
    "xcb"
    ]
    },
    "archreq": 0,
    "className": "QXcbIntegrationPlugin",
    "debug": false,
    "version": 330752
    }

    Got keys from plugin meta data ("xcb")
    QFactoryLoader::QFactoryLoader() checking directory path "/opt/ros/noetic/lib/turtlesim/platforms" ...
    loaded library "/usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqxcb.so"
    qt.qpa.xcb: could not connect to display dev:0
    qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" 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, xcb.

    Aborted (core dumped)

    It would be awesome if you people know where the problem is and could help me here. Since I practically know nothing in Ubuntu and Linux, I would appreciate it a lot if you could explain it in language I could understand. A huge thanks in advance.

    If that might come, I want to add that I have msvc2017_64 installed.

    JonBJ 1 Reply Last reply
    0
    • A arad2456

      Hey everyone, I am trying to get Qt working in Ubuntu of windows, but I can't get it done. I downloaded the version 5.12.12. The message I get is:
      qt.qpa.xcb: could not connect to display dev:0
      qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" 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, xcb.
      Aborted (core dumped)

      I know there are many solutions for that on the internet, but they didn't work for me, which is why I am asking here. When I run "export QT_DEBUG_PLUGINS=1" I get:
      QFactoryLoader::QFactoryLoader() checking directory path "/usr/lib/x86_64-linux-gnu/qt5/plugins/platforms" ...
      QFactoryLoader::QFactoryLoader() looking at "/usr/lib/x86_64-linux-gnu/qt5/plugins/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"
      ]
      },
      "archreq": 0,
      "className": "QEglFSIntegrationPlugin",
      "debug": false,
      "version": 330752
      }

      Got keys from plugin meta data ("eglfs")
      QFactoryLoader::QFactoryLoader() looking at "/usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqlinuxfb.so"
      Found metadata in lib /usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqlinuxfb.so, metadata=
      {
      "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
      "MetaData": {
      "Keys": [
      "linuxfb"
      ]
      },
      "archreq": 0,
      "className": "QLinuxFbIntegrationPlugin",
      "debug": false,
      "version": 330752
      }

      Got keys from plugin meta data ("linuxfb")
      QFactoryLoader::QFactoryLoader() looking at "/usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqminimal.so"
      Found metadata in lib /usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqminimal.so, metadata=
      {
      "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
      "MetaData": {
      "Keys": [
      "minimal"
      ]
      },
      "archreq": 0,
      "className": "QMinimalIntegrationPlugin",
      "debug": false,
      "version": 330752
      }

      Got keys from plugin meta data ("minimal")
      QFactoryLoader::QFactoryLoader() looking at "/usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqminimalegl.so"
      Found metadata in lib /usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqminimalegl.so, metadata=
      {
      "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
      "MetaData": {
      "Keys": [
      "minimalegl"
      ]
      },
      "archreq": 0,
      "className": "QMinimalEglIntegrationPlugin",
      "debug": false,
      "version": 330752
      }

      Got keys from plugin meta data ("minimalegl")
      QFactoryLoader::QFactoryLoader() looking at "/usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqoffscreen.so"
      Found metadata in lib /usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqoffscreen.so, metadata=
      {
      "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
      "MetaData": {
      "Keys": [
      "offscreen"
      ]
      },
      "archreq": 0,
      "className": "QOffscreenIntegrationPlugin",
      "debug": false,
      "version": 330752
      }

      Got keys from plugin meta data ("offscreen")
      QFactoryLoader::QFactoryLoader() looking at "/usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqvnc.so"
      Found metadata in lib /usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqvnc.so, metadata=
      {
      "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
      "MetaData": {
      "Keys": [
      "vnc"
      ]
      },
      "archreq": 0,
      "className": "QVncIntegrationPlugin",
      "debug": false,
      "version": 330752
      }

      Got keys from plugin meta data ("vnc")
      QFactoryLoader::QFactoryLoader() looking at "/usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqxcb.so"
      Found metadata in lib /usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqxcb.so, metadata=
      {
      "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
      "MetaData": {
      "Keys": [
      "xcb"
      ]
      },
      "archreq": 0,
      "className": "QXcbIntegrationPlugin",
      "debug": false,
      "version": 330752
      }

      Got keys from plugin meta data ("xcb")
      QFactoryLoader::QFactoryLoader() checking directory path "/opt/ros/noetic/lib/turtlesim/platforms" ...
      loaded library "/usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqxcb.so"
      qt.qpa.xcb: could not connect to display dev:0
      qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" 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, xcb.

      Aborted (core dumped)

      It would be awesome if you people know where the problem is and could help me here. Since I practically know nothing in Ubuntu and Linux, I would appreciate it a lot if you could explain it in language I could understand. A huge thanks in advance.

      If that might come, I want to add that I have msvc2017_64 installed.

      JonBJ Offline
      JonBJ Offline
      JonB
      wrote on last edited by
      #2

      @arad2456 said in Can't get Qt to work on Ubuntu:

      qt.qpa.xcb: could not connect to display dev:0

      This is the error and the only line which matters. Your installation and xcb are fine. It is connecting to your display which is the problem.

      Does running, say, an xterm work or give similar message?

      1 Reply Last reply
      0
      • A Offline
        A Offline
        arad2456
        wrote on last edited by
        #3

        Thank you for your help. No, when I try to run it I get the error message:
        xterm: Xt error: Can't open display: dev:0

        JKSHJ 1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          Which version of Ubuntu are you running ?
          Are you using a desktop environment ?
          If so, which one ?

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0
          • A arad2456

            Thank you for your help. No, when I try to run it I get the error message:
            xterm: Xt error: Can't open display: dev:0

            JKSHJ Offline
            JKSHJ Offline
            JKSH
            Moderators
            wrote on last edited by
            #5

            @arad2456 said in Can't get Qt to work on Ubuntu:

            Ubuntu of windows

            Which version of Windows Subsystem for Linux (WSL) do you have? The original WSL does not support GUIs. You need WSL 2 with Windows 11 for it to work: https://learn.microsoft.com/en-us/windows/wsl/tutorials/gui-apps

            Since I practically know nothing in Ubuntu and Linux, I would appreciate it a lot if you could explain it in language I could understand.

            In this case, I suggest you install Ubuntu in a virtual machine (like VirtualBox or VMWare Player) instead of using WSL.

            Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

            1 Reply Last reply
            3

            • Login

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Users
            • Groups
            • Search
            • Get Qt Extensions
            • Unsolved