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. Remote debugging error on raspberry "can't open /dev/mem: Permission denied" (sudo..)
Forum Updated to NodeBB v4.3 + New Features

Remote debugging error on raspberry "can't open /dev/mem: Permission denied" (sudo..)

Scheduled Pinned Locked Moved Solved Mobile and Embedded
8 Posts 4 Posters 2.2k 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.
  • K Offline
    K Offline
    K-Str
    wrote on 24 Aug 2018, 12:07 last edited by K-Str
    #1

    Hello to all,
    in the past I got very good support here. Thanks!
    Now I have a problem running a application.
    can't open /dev/mem: Permission denied
    I think there is only a little missing.
    How can I run an application as root (sudo ...)?
    This is my configuration:
    Qt Creator 4.5.0
    Based on Qt 5.10.0 (GCC 5.3.1 20160406 (Red Hat 5.3.1-6), 64 bit)
    Built on Dec 4 2017 04:11:21

    J J J 3 Replies Last reply 24 Aug 2018, 12:27
    0
    • K K-Str
      24 Aug 2018, 12:07

      Hello to all,
      in the past I got very good support here. Thanks!
      Now I have a problem running a application.
      can't open /dev/mem: Permission denied
      I think there is only a little missing.
      How can I run an application as root (sudo ...)?
      This is my configuration:
      Qt Creator 4.5.0
      Based on Qt 5.10.0 (GCC 5.3.1 20160406 (Red Hat 5.3.1-6), 64 bit)
      Built on Dec 4 2017 04:11:21

      J Offline
      J Offline
      J.Hilk
      Moderators
      wrote on 24 Aug 2018, 12:27 last edited by
      #2

      Hi @K-Str
      I‘m not to familiar with Linux, but this problem I remember.

      The issue is, that QtCreator, that you use for debugging?, needs to run with sudo right, because the creator starts the debugger and inherits the permissions of QtCreator.


      Be aware of the Qt Code of Conduct, when posting : https://forum.qt.io/topic/113070/qt-code-of-conduct


      Q: What's that?
      A: It's blue light.
      Q: What does it do?
      A: It turns blue.

      1 Reply Last reply
      0
      • K K-Str
        24 Aug 2018, 12:07

        Hello to all,
        in the past I got very good support here. Thanks!
        Now I have a problem running a application.
        can't open /dev/mem: Permission denied
        I think there is only a little missing.
        How can I run an application as root (sudo ...)?
        This is my configuration:
        Qt Creator 4.5.0
        Based on Qt 5.10.0 (GCC 5.3.1 20160406 (Red Hat 5.3.1-6), 64 bit)
        Built on Dec 4 2017 04:11:21

        J Offline
        J Offline
        jsulm
        Lifetime Qt Champion
        wrote on 24 Aug 2018, 12:39 last edited by
        #3

        @K-Str said in Remote debugging error on raspberry "can't open /dev/mem: Permission denied" (sudo..):

        How can I run an application as root (sudo ...)?

        sudo qtcreator
        

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

        1 Reply Last reply
        0
        • K K-Str
          24 Aug 2018, 12:07

          Hello to all,
          in the past I got very good support here. Thanks!
          Now I have a problem running a application.
          can't open /dev/mem: Permission denied
          I think there is only a little missing.
          How can I run an application as root (sudo ...)?
          This is my configuration:
          Qt Creator 4.5.0
          Based on Qt 5.10.0 (GCC 5.3.1 20160406 (Red Hat 5.3.1-6), 64 bit)
          Built on Dec 4 2017 04:11:21

          J Offline
          J Offline
          JonB
          wrote on 24 Aug 2018, 12:47 last edited by
          #4

          @K-Str
          If @jsulm's sudo qtcreator works for you, great.

          However, although I've never done remote debugging or RPi anything, I would have thought since your post is entitled Remote debugging that your problem & error message come from the remote/server side, not the local/client side of the debugging process? In which case you need to address your permission problem where it's happening on the RPi, not on the client side...?

          1 Reply Last reply
          0
          • K Offline
            K Offline
            K-Str
            wrote on 24 Aug 2018, 12:51 last edited by K-Str
            #5

            @jsulm ,
            thanks for your answer, but the problem is on the Raspberry.
            When I run sudo qtcreator it still makes the same problem because its not allowed to run the application on the raspberry. The access to /dev/mem needs root privileges.

            J 1 Reply Last reply 24 Aug 2018, 12:55
            0
            • K K-Str
              24 Aug 2018, 12:51

              @jsulm ,
              thanks for your answer, but the problem is on the Raspberry.
              When I run sudo qtcreator it still makes the same problem because its not allowed to run the application on the raspberry. The access to /dev/mem needs root privileges.

              J Offline
              J Offline
              JonB
              wrote on 24 Aug 2018, 12:55 last edited by JonB
              #6

              @K-Str
              Which is exactly what I just wrote earlier.
              Hence you should be looking at your gdbserver permissions on the RPi, no?

              1 Reply Last reply
              0
              • K Offline
                K Offline
                K-Str
                wrote on 24 Aug 2018, 16:01 last edited by
                #7

                @JonB ,
                I checked it .
                This are the permissions of gdbserver:
                -rwxr-xr-x 1 root root 235168 Okt 27 2016 /usr/bin/gdbserver
                Is there any way to execute the application like
                sudo applname
                and how can I setup this in QT-Creater on the UBUNTU host??

                1 Reply Last reply
                0
                • K Offline
                  K Offline
                  K-Str
                  wrote on 16 Feb 2020, 09:09 last edited by
                  #8

                  Hi,
                  I solved this.
                  When I login on the device as user root then it works,

                  1 Reply Last reply
                  0

                  • Login

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