gcc build error : cannot find -lssl

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
1
down vote

favorite














Hey all,

i am trying to build a project called RamCloud on CentOS Linux release 7.4.1708

this project specifically requires gcc 4.9 and with my centos i only had gcc 4.8 so i had to :



  • completely remove gcc4.8 from my system sudo yum remove
    --skip-broken gcc


  • install scl sudo yum install centos-release-scl

  • install
    devtoolset-3
    which includes gcc4.9 sudo yum install devtoolset-3

  • enable the devtoolset scl enable devtoolset-3 bash

that helped with some errors i had before, but now when i try to run sudo make -j12 to build the project, i get errors related to the devtoolset

this is what the error looks like :




/opt/rh/devtoolset-3/root/usr/libexec/gcc/x86_64-redhat-linux/4.9.2/ld:
cannot find -lssl
/opt/rh/devtoolset-3/root/usr/libexec/gcc/x86_64-redhat-linux/4.9.2/ld:
cannot find -lcrypto
collect2: error: ld returned 1 exit status
make: [obj.master/apps/client] Error 1
make: Waiting for unfinished jobs....




i'm not sure but i think it's a linking problem, any one encountered this before ?







share|improve this question
























    up vote
    1
    down vote

    favorite














    Hey all,

    i am trying to build a project called RamCloud on CentOS Linux release 7.4.1708

    this project specifically requires gcc 4.9 and with my centos i only had gcc 4.8 so i had to :



    • completely remove gcc4.8 from my system sudo yum remove
      --skip-broken gcc


    • install scl sudo yum install centos-release-scl

    • install
      devtoolset-3
      which includes gcc4.9 sudo yum install devtoolset-3

    • enable the devtoolset scl enable devtoolset-3 bash

    that helped with some errors i had before, but now when i try to run sudo make -j12 to build the project, i get errors related to the devtoolset

    this is what the error looks like :




    /opt/rh/devtoolset-3/root/usr/libexec/gcc/x86_64-redhat-linux/4.9.2/ld:
    cannot find -lssl
    /opt/rh/devtoolset-3/root/usr/libexec/gcc/x86_64-redhat-linux/4.9.2/ld:
    cannot find -lcrypto
    collect2: error: ld returned 1 exit status
    make: [obj.master/apps/client] Error 1
    make: Waiting for unfinished jobs....




    i'm not sure but i think it's a linking problem, any one encountered this before ?







    share|improve this question






















      up vote
      1
      down vote

      favorite









      up vote
      1
      down vote

      favorite













      Hey all,

      i am trying to build a project called RamCloud on CentOS Linux release 7.4.1708

      this project specifically requires gcc 4.9 and with my centos i only had gcc 4.8 so i had to :



      • completely remove gcc4.8 from my system sudo yum remove
        --skip-broken gcc


      • install scl sudo yum install centos-release-scl

      • install
        devtoolset-3
        which includes gcc4.9 sudo yum install devtoolset-3

      • enable the devtoolset scl enable devtoolset-3 bash

      that helped with some errors i had before, but now when i try to run sudo make -j12 to build the project, i get errors related to the devtoolset

      this is what the error looks like :




      /opt/rh/devtoolset-3/root/usr/libexec/gcc/x86_64-redhat-linux/4.9.2/ld:
      cannot find -lssl
      /opt/rh/devtoolset-3/root/usr/libexec/gcc/x86_64-redhat-linux/4.9.2/ld:
      cannot find -lcrypto
      collect2: error: ld returned 1 exit status
      make: [obj.master/apps/client] Error 1
      make: Waiting for unfinished jobs....




      i'm not sure but i think it's a linking problem, any one encountered this before ?







      share|improve this question














      Hey all,

      i am trying to build a project called RamCloud on CentOS Linux release 7.4.1708

      this project specifically requires gcc 4.9 and with my centos i only had gcc 4.8 so i had to :



      • completely remove gcc4.8 from my system sudo yum remove
        --skip-broken gcc


      • install scl sudo yum install centos-release-scl

      • install
        devtoolset-3
        which includes gcc4.9 sudo yum install devtoolset-3

      • enable the devtoolset scl enable devtoolset-3 bash

      that helped with some errors i had before, but now when i try to run sudo make -j12 to build the project, i get errors related to the devtoolset

      this is what the error looks like :




      /opt/rh/devtoolset-3/root/usr/libexec/gcc/x86_64-redhat-linux/4.9.2/ld:
      cannot find -lssl
      /opt/rh/devtoolset-3/root/usr/libexec/gcc/x86_64-redhat-linux/4.9.2/ld:
      cannot find -lcrypto
      collect2: error: ld returned 1 exit status
      make: [obj.master/apps/client] Error 1
      make: Waiting for unfinished jobs....




      i'm not sure but i think it's a linking problem, any one encountered this before ?









      share|improve this question











      share|improve this question




      share|improve this question










      asked Feb 9 at 19:04









      Mheni

      1083




      1083




















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          3
          down vote



          accepted










          Both errors are related to the OpenSSL development libraries not being installed ( -lssl is a pretty dead giveway).



          The -lssl can be divided into -l, meaning "link with", and ssl, which is the desired library gcc is asked to link in. Usually, the file to link in is named lib<whatever_comes_after_the_-l>.a and it needs the headers. The file and headers are in the dev (Debian-based) or devel (RPM-based) packages.
          Here, ssl -> openssl, but you need development packages so it is either openssl-dev or openssl-devel.



          So now you can search for the package that contains lib<whatever_comes_after_the_-l>.a. For Debian-based distributions, I install apt-file.



          In Debian:



          apt-file update
          apt-file search libssl.a


          In CentOS:



          rpm -q -f libssl.a


          In Debian, to install them do:



          sudo apt-get install openssl-dev


          In CentOS, to install them do:



          sudo yum install openssl-devel





          share|improve this answer






















            Your Answer







            StackExchange.ready(function()
            var channelOptions =
            tags: "".split(" "),
            id: "106"
            ;
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function()
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled)
            StackExchange.using("snippets", function()
            createEditor();
            );

            else
            createEditor();

            );

            function createEditor()
            StackExchange.prepareEditor(
            heartbeatType: 'answer',
            convertImagesToLinks: false,
            noModals: false,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: null,
            bindNavPrevention: true,
            postfix: "",
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            );



            );








             

            draft saved


            draft discarded


















            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f423107%2fgcc-build-error-cannot-find-lssl%23new-answer', 'question_page');

            );

            Post as a guest






























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes








            up vote
            3
            down vote



            accepted










            Both errors are related to the OpenSSL development libraries not being installed ( -lssl is a pretty dead giveway).



            The -lssl can be divided into -l, meaning "link with", and ssl, which is the desired library gcc is asked to link in. Usually, the file to link in is named lib<whatever_comes_after_the_-l>.a and it needs the headers. The file and headers are in the dev (Debian-based) or devel (RPM-based) packages.
            Here, ssl -> openssl, but you need development packages so it is either openssl-dev or openssl-devel.



            So now you can search for the package that contains lib<whatever_comes_after_the_-l>.a. For Debian-based distributions, I install apt-file.



            In Debian:



            apt-file update
            apt-file search libssl.a


            In CentOS:



            rpm -q -f libssl.a


            In Debian, to install them do:



            sudo apt-get install openssl-dev


            In CentOS, to install them do:



            sudo yum install openssl-devel





            share|improve this answer


























              up vote
              3
              down vote



              accepted










              Both errors are related to the OpenSSL development libraries not being installed ( -lssl is a pretty dead giveway).



              The -lssl can be divided into -l, meaning "link with", and ssl, which is the desired library gcc is asked to link in. Usually, the file to link in is named lib<whatever_comes_after_the_-l>.a and it needs the headers. The file and headers are in the dev (Debian-based) or devel (RPM-based) packages.
              Here, ssl -> openssl, but you need development packages so it is either openssl-dev or openssl-devel.



              So now you can search for the package that contains lib<whatever_comes_after_the_-l>.a. For Debian-based distributions, I install apt-file.



              In Debian:



              apt-file update
              apt-file search libssl.a


              In CentOS:



              rpm -q -f libssl.a


              In Debian, to install them do:



              sudo apt-get install openssl-dev


              In CentOS, to install them do:



              sudo yum install openssl-devel





              share|improve this answer
























                up vote
                3
                down vote



                accepted







                up vote
                3
                down vote



                accepted






                Both errors are related to the OpenSSL development libraries not being installed ( -lssl is a pretty dead giveway).



                The -lssl can be divided into -l, meaning "link with", and ssl, which is the desired library gcc is asked to link in. Usually, the file to link in is named lib<whatever_comes_after_the_-l>.a and it needs the headers. The file and headers are in the dev (Debian-based) or devel (RPM-based) packages.
                Here, ssl -> openssl, but you need development packages so it is either openssl-dev or openssl-devel.



                So now you can search for the package that contains lib<whatever_comes_after_the_-l>.a. For Debian-based distributions, I install apt-file.



                In Debian:



                apt-file update
                apt-file search libssl.a


                In CentOS:



                rpm -q -f libssl.a


                In Debian, to install them do:



                sudo apt-get install openssl-dev


                In CentOS, to install them do:



                sudo yum install openssl-devel





                share|improve this answer














                Both errors are related to the OpenSSL development libraries not being installed ( -lssl is a pretty dead giveway).



                The -lssl can be divided into -l, meaning "link with", and ssl, which is the desired library gcc is asked to link in. Usually, the file to link in is named lib<whatever_comes_after_the_-l>.a and it needs the headers. The file and headers are in the dev (Debian-based) or devel (RPM-based) packages.
                Here, ssl -> openssl, but you need development packages so it is either openssl-dev or openssl-devel.



                So now you can search for the package that contains lib<whatever_comes_after_the_-l>.a. For Debian-based distributions, I install apt-file.



                In Debian:



                apt-file update
                apt-file search libssl.a


                In CentOS:



                rpm -q -f libssl.a


                In Debian, to install them do:



                sudo apt-get install openssl-dev


                In CentOS, to install them do:



                sudo yum install openssl-devel






                share|improve this answer














                share|improve this answer



                share|improve this answer








                edited Feb 9 at 21:32

























                answered Feb 9 at 19:11









                Rui F Ribeiro

                35k1269113




                35k1269113






















                     

                    draft saved


                    draft discarded


























                     


                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function ()
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f423107%2fgcc-build-error-cannot-find-lssl%23new-answer', 'question_page');

                    );

                    Post as a guest













































































                    Popular posts from this blog

                    Peggy Mitchell

                    Palaiologos

                    The Forum (Inglewood, California)