Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. This application failed to start because it could not find or load the Qt Platform plugin "xcb"
Forum Updated to NodeBB v4.3 + New Features

This application failed to start because it could not find or load the Qt Platform plugin "xcb"

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
7 Posts 4 Posters 1.6k Views 1 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.
  • edwardy84E Offline
    edwardy84E Offline
    edwardy84
    wrote on last edited by
    #1

    Hi, i have found this error below and I'm interested to find out what could be the quick fix for this problem.

    I have installed Qt5 on the RPi4 and i compiled the given source code for RPi3. the compilation looks good and no error found.

    however after i copied the file and try to run on the RPi3, then it showed me error below:

    This application failed to start because it could not find or load the Qt platform plugin "xcb" in "".
    
    Available platform plugins are: eglfs, linuxcfb, minimal, minimalegl, offscreen, vnc, webgl, xcb.
    
    Reinstalling the application may fix this problem
    Aborted
    

    51af54ef-c3e3-4106-934d-1b03a9790a03-image.png

    i have tried to reinstall couple of times but it still not working.

    any idea for quick fixing this issue?

    jsulmJ JonBJ Pablo J. RoginaP 3 Replies Last reply
    0
    • edwardy84E edwardy84

      Hi, i have found this error below and I'm interested to find out what could be the quick fix for this problem.

      I have installed Qt5 on the RPi4 and i compiled the given source code for RPi3. the compilation looks good and no error found.

      however after i copied the file and try to run on the RPi3, then it showed me error below:

      This application failed to start because it could not find or load the Qt platform plugin "xcb" in "".
      
      Available platform plugins are: eglfs, linuxcfb, minimal, minimalegl, offscreen, vnc, webgl, xcb.
      
      Reinstalling the application may fix this problem
      Aborted
      

      51af54ef-c3e3-4106-934d-1b03a9790a03-image.png

      i have tried to reinstall couple of times but it still not working.

      any idea for quick fixing this issue?

      jsulmJ Offline
      jsulmJ Offline
      jsulm
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @edwardy84 Don't use sudo!
      Did you set executable bit on your app for the user?

      chmod u+x mvc-ui
      

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      edwardy84E 1 Reply Last reply
      0
      • edwardy84E edwardy84

        Hi, i have found this error below and I'm interested to find out what could be the quick fix for this problem.

        I have installed Qt5 on the RPi4 and i compiled the given source code for RPi3. the compilation looks good and no error found.

        however after i copied the file and try to run on the RPi3, then it showed me error below:

        This application failed to start because it could not find or load the Qt platform plugin "xcb" in "".
        
        Available platform plugins are: eglfs, linuxcfb, minimal, minimalegl, offscreen, vnc, webgl, xcb.
        
        Reinstalling the application may fix this problem
        Aborted
        

        51af54ef-c3e3-4106-934d-1b03a9790a03-image.png

        i have tried to reinstall couple of times but it still not working.

        any idea for quick fixing this issue?

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

        @edwardy84
        Further to @jsulm, your screenshot showed you first typed in

        ./ mvc-ui
        >>> bash ./ Is a directory
        

        That was not a good idea :) You need to type ./mvc-ui before you go any further!

        Plain mvc-ui won't work if your RPi is like e.g. Ubuntu (I don't know), as . is not on your path. Hence ./mvc-ui, which will run.

        If probs, please show ls -l mvc-ui, I don't know what "white on pink background" signifies!

        edwardy84E 1 Reply Last reply
        1
        • edwardy84E edwardy84

          Hi, i have found this error below and I'm interested to find out what could be the quick fix for this problem.

          I have installed Qt5 on the RPi4 and i compiled the given source code for RPi3. the compilation looks good and no error found.

          however after i copied the file and try to run on the RPi3, then it showed me error below:

          This application failed to start because it could not find or load the Qt platform plugin "xcb" in "".
          
          Available platform plugins are: eglfs, linuxcfb, minimal, minimalegl, offscreen, vnc, webgl, xcb.
          
          Reinstalling the application may fix this problem
          Aborted
          

          51af54ef-c3e3-4106-934d-1b03a9790a03-image.png

          i have tried to reinstall couple of times but it still not working.

          any idea for quick fixing this issue?

          Pablo J. RoginaP Offline
          Pablo J. RoginaP Offline
          Pablo J. Rogina
          wrote on last edited by
          #4

          @edwardy84 said in This application failed to start because it could not find or load the Qt Platform plugin "xcb":

          Qt platform plugin "xcb" in "".

          Do you have X11 installed and running in your RPi 4 device?

          The way your starting your Qt app, with no "-platform" parameter to specify any platform plugin, is defaulting to xcb and thus requires X11 running.

          You may want to try with other plugin, for instance the following call will start your app in full screen mode:
          ./mvc-ui -platform linuxfb

          Upvote the answer(s) that helped you solve the issue
          Use "Topic Tools" button to mark your post as Solved
          Add screenshots via postimage.org
          Don't ask support requests via chat/PM. Please use the forum so others can benefit from the solution in the future

          1 Reply Last reply
          0
          • JonBJ JonB

            @edwardy84
            Further to @jsulm, your screenshot showed you first typed in

            ./ mvc-ui
            >>> bash ./ Is a directory
            

            That was not a good idea :) You need to type ./mvc-ui before you go any further!

            Plain mvc-ui won't work if your RPi is like e.g. Ubuntu (I don't know), as . is not on your path. Hence ./mvc-ui, which will run.

            If probs, please show ls -l mvc-ui, I don't know what "white on pink background" signifies!

            edwardy84E Offline
            edwardy84E Offline
            edwardy84
            wrote on last edited by
            #5

            @JonB here is the ls -l

            57d44332-6120-4630-8115-df586dd35396-image.png

            1 Reply Last reply
            0
            • jsulmJ jsulm

              @edwardy84 Don't use sudo!
              Did you set executable bit on your app for the user?

              chmod u+x mvc-ui
              
              edwardy84E Offline
              edwardy84E Offline
              edwardy84
              wrote on last edited by
              #6

              @jsulm here is the before and after

              chmod u+x mvc-ui
              

              f90734fd-efec-4224-a857-fc0dbaa4c8a6-image.png

              is there any different?

              jsulmJ 1 Reply Last reply
              0
              • edwardy84E edwardy84

                @jsulm here is the before and after

                chmod u+x mvc-ui
                

                f90734fd-efec-4224-a857-fc0dbaa4c8a6-image.png

                is there any different?

                jsulmJ Offline
                jsulmJ Offline
                jsulm
                Lifetime Qt Champion
                wrote on last edited by
                #7

                @edwardy84 First: why is the user of your executable set to "root"?!
                Change it to your normal user (I assume your user is "pi" if not change the command bellow):

                sudo chown pi mvc-ui
                

                Second: setuid bit is set, change that:

                chmod u-s mvc-ui
                

                Starting GUI applications with sudo/root can be tricky and usually not needed and dangerous.

                https://forum.qt.io/topic/113070/qt-code-of-conduct

                1 Reply Last reply
                1

                • Login

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