Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. "error: cannot find -lGL" after initial setup of Qt Creator on Linux
Forum Updated to NodeBB v4.3 + New Features

"error: cannot find -lGL" after initial setup of Qt Creator on Linux

Scheduled Pinned Locked Moved Solved General and Desktop
12 Posts 7 Posters 5.1k Views 3 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.
  • G Offline
    G Offline
    graniteDev
    wrote on last edited by
    #2

    It looks like I'm missing lGL

    /usr/bin/ld: cannot find -lGL
    

    How do I get this lGL?

    1 Reply Last reply
    0
    • M Offline
      M Offline
      mpergand
      wrote on last edited by mpergand
      #3

      Most asked question on this forum :)

      Searching the internet didn't reveal anything specific to this error,

      The problem is the minus sign in -IGL
      you should enclose it with commas like that:

      cannot find "-lGL"
      

      You can try:

      sudo apt-get install libglu1-mesa-dev -y
      Tested with Qt5.3.1 and Ubuntu 14.04 and it solved the problem with missing -lGL.
      

      source: Install Qt 5 on Ubuntu

      G 2 Replies Last reply
      5
      • M mpergand

        Most asked question on this forum :)

        Searching the internet didn't reveal anything specific to this error,

        The problem is the minus sign in -IGL
        you should enclose it with commas like that:

        cannot find "-lGL"
        

        You can try:

        sudo apt-get install libglu1-mesa-dev -y
        Tested with Qt5.3.1 and Ubuntu 14.04 and it solved the problem with missing -lGL.
        

        source: Install Qt 5 on Ubuntu

        G Offline
        G Offline
        graniteDev
        wrote on last edited by
        #4

        @mpergand said in "error: cannot find -lGL" after initial setup of Qt Creator on Linux:

        The problem is the minus sign in -IGL
        you should enclose it with commas like that:

        cannot find "-lGL"
        

        I didn't do that, that's copied right out of the error in the compiler window

        You can try:

        sudo apt-get install libglu1-mesa-dev -y
        

        Tested with Qt5.3.1 and Ubuntu 14.04 and it solved the problem with missing -lGL.

        I'm running Qt5.11.3, not sure if that's still compatible? Better question, will I brake anything installing this?

        aha_1980A jsulmJ 2 Replies Last reply
        0
        • G graniteDev

          @mpergand said in "error: cannot find -lGL" after initial setup of Qt Creator on Linux:

          The problem is the minus sign in -IGL
          you should enclose it with commas like that:

          cannot find "-lGL"
          

          I didn't do that, that's copied right out of the error in the compiler window

          You can try:

          sudo apt-get install libglu1-mesa-dev -y
          

          Tested with Qt5.3.1 and Ubuntu 14.04 and it solved the problem with missing -lGL.

          I'm running Qt5.11.3, not sure if that's still compatible? Better question, will I brake anything installing this?

          aha_1980A Offline
          aha_1980A Offline
          aha_1980
          Lifetime Qt Champion
          wrote on last edited by
          #5

          @graniteDev just do a google search, this is a common task. I've done it multiple times too, but I do google all the time again because I've forgot it.

          Qt has to stay free or it will die.

          1 Reply Last reply
          2
          • G graniteDev

            @mpergand said in "error: cannot find -lGL" after initial setup of Qt Creator on Linux:

            The problem is the minus sign in -IGL
            you should enclose it with commas like that:

            cannot find "-lGL"
            

            I didn't do that, that's copied right out of the error in the compiler window

            You can try:

            sudo apt-get install libglu1-mesa-dev -y
            

            Tested with Qt5.3.1 and Ubuntu 14.04 and it solved the problem with missing -lGL.

            I'm running Qt5.11.3, not sure if that's still compatible? Better question, will I brake anything installing this?

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

            @graniteDev said in "error: cannot find -lGL" after initial setup of Qt Creator on Linux:

            Better question, will I brake anything installing this?

            No, it is a packet provided and tested by Ubuntu.

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

            1 Reply Last reply
            2
            • M mpergand

              Most asked question on this forum :)

              Searching the internet didn't reveal anything specific to this error,

              The problem is the minus sign in -IGL
              you should enclose it with commas like that:

              cannot find "-lGL"
              

              You can try:

              sudo apt-get install libglu1-mesa-dev -y
              Tested with Qt5.3.1 and Ubuntu 14.04 and it solved the problem with missing -lGL.
              

              source: Install Qt 5 on Ubuntu

              G Offline
              G Offline
              graniteDev
              wrote on last edited by
              #7

              @mpergand Installing libglu1-mesa-dev fixed it. How did you know this? I searched for hours and nothing came up for the error's Qt was giving me. "lGL" really doesn't bring up anything in a search.

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

                Hi,

                @graniteDev because that's a question that has been asked a hundred times on this forum and others. If you search for cannot find lGL you'll have lots of answers both here and on your favorite search engine. However if you don't drop the -, search engines will specifically search for answer not containing what follows that sign.

                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
                2
                • mrjjM Offline
                  mrjjM Offline
                  mrjj
                  Lifetime Qt Champion
                  wrote on last edited by
                  #9

                  Hi
                  Just as a note quoting the actual error also provides tons of links
                  " error: cannot find -lGL"

                  1 Reply Last reply
                  2
                  • R Offline
                    R Offline
                    Rlynn0618
                    wrote on last edited by
                    #10

                    @mpergand said in "error: cannot find -lGL" after initial setup of Qt Creator on Linux:

                    cannot find "-lGL"

                    Hi I now this thread is quite old but I'm having the same issue with a machine I'm working on in work, unfortunately this machine does not have any internet connection and everythiing we've tried to do to to get it connected to the network has failed. Therefore, we are unable to ran any of those commands to install the missing package 😢. Any suggestions for an offline solution ? any help would be greatly appreciated.

                    Error:

                    cannot find -lGL
                    collect2: error: Id returned 1 exit status

                    jsulmJ 1 Reply Last reply
                    0
                    • R Rlynn0618

                      @mpergand said in "error: cannot find -lGL" after initial setup of Qt Creator on Linux:

                      cannot find "-lGL"

                      Hi I now this thread is quite old but I'm having the same issue with a machine I'm working on in work, unfortunately this machine does not have any internet connection and everythiing we've tried to do to to get it connected to the network has failed. Therefore, we are unable to ran any of those commands to install the missing package 😢. Any suggestions for an offline solution ? any help would be greatly appreciated.

                      Error:

                      cannot find -lGL
                      collect2: error: Id returned 1 exit status

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

                      @Rlynn0618 said in "error: cannot find -lGL" after initial setup of Qt Creator on Linux:

                      Any suggestions for an offline solution ?

                      You can use a DVD or mount an image for your Linux distribution and use that as source for installation.
                      On Debian based distributions you will need to edit /etc/apt/sources.list file.
                      Fore more information refer to the documentation of your distribution.

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

                      1 Reply Last reply
                      0
                      • R Offline
                        R Offline
                        Rlynn0618
                        wrote on last edited by
                        #12

                        Thanks for replying, I managed to get it using the following command.

                        [root@localhost ~]# ln -s /usr/lib64/libGL.so.1 /usr/ lib/libGL.so

                        (solution link: http://c.biancheng.net/view/3901.html)

                        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