Cannot install hexbin library R on AWS instance












0















I am working on a project that uses the package plotly in R.
When I tried installing plotly, hexbin (a dependency) would not compile, because it could not find the gfortran .so libraries.
I have already installed gfortran (gcc64-gfortran.x86_64), but the .so files are not installed or discoverable by ld. Here is the relevant part of the log:



$ R
> install.packages("hexbin", repos = "http://cran.rstudio.com/")
Installing package into ‘/home/ec2-user/R/x86_64-redhat-linux-gnu-library/3.4’

...

gcc -m64 -std=gnu99 -shared -L/usr/lib64/R/lib -L/usr/local/lib64 -o hexbin.so hbin.o hcell.o herode.o hsm.o reg.o -lgfortran -lm -lquadmath - L/usr/lib64/R/lib -lR
/usr/bin/ld: cannot find -lgfortran
/usr/bin/ld: cannot find -lquadmath
collect2: error: ld returned 1 exit status


Running ld -lgfortran --verbose gives me this:



...

==================================================
attempt to open /usr/x86_64-amazon-linux/lib64/libgfortran.so failed
attempt to open /usr/x86_64-amazon-linux/lib64/libgfortran.a failed
attempt to open /usr/lib64/libgfortran.so failed
attempt to open /usr/lib64/libgfortran.a failed
attempt to open /usr/local/lib64/libgfortran.so failed
attempt to open /usr/local/lib64/libgfortran.a failed
attempt to open /lib64/libgfortran.so failed
attempt to open /lib64/libgfortran.a failed
attempt to open /usr/x86_64-amazon-linux/lib/libgfortran.so failed
attempt to open /usr/x86_64-amazon-linux/lib/libgfortran.a failed
attempt to open /usr/local/lib/libgfortran.so failed
attempt to open /usr/local/lib/libgfortran.a failed
attempt to open /lib/libgfortran.so failed
attempt to open /lib/libgfortran.a failed
attempt to open /usr/lib/libgfortran.so failed
attempt to open /usr/lib/libgfortran.a failed
ld: cannot find -lgfortran


yum info gcc64-gfortran.x86_64 says that my installation of gfortran is at version 6.4.1 from amzn-main.










share|improve this question



























    0















    I am working on a project that uses the package plotly in R.
    When I tried installing plotly, hexbin (a dependency) would not compile, because it could not find the gfortran .so libraries.
    I have already installed gfortran (gcc64-gfortran.x86_64), but the .so files are not installed or discoverable by ld. Here is the relevant part of the log:



    $ R
    > install.packages("hexbin", repos = "http://cran.rstudio.com/")
    Installing package into ‘/home/ec2-user/R/x86_64-redhat-linux-gnu-library/3.4’

    ...

    gcc -m64 -std=gnu99 -shared -L/usr/lib64/R/lib -L/usr/local/lib64 -o hexbin.so hbin.o hcell.o herode.o hsm.o reg.o -lgfortran -lm -lquadmath - L/usr/lib64/R/lib -lR
    /usr/bin/ld: cannot find -lgfortran
    /usr/bin/ld: cannot find -lquadmath
    collect2: error: ld returned 1 exit status


    Running ld -lgfortran --verbose gives me this:



    ...

    ==================================================
    attempt to open /usr/x86_64-amazon-linux/lib64/libgfortran.so failed
    attempt to open /usr/x86_64-amazon-linux/lib64/libgfortran.a failed
    attempt to open /usr/lib64/libgfortran.so failed
    attempt to open /usr/lib64/libgfortran.a failed
    attempt to open /usr/local/lib64/libgfortran.so failed
    attempt to open /usr/local/lib64/libgfortran.a failed
    attempt to open /lib64/libgfortran.so failed
    attempt to open /lib64/libgfortran.a failed
    attempt to open /usr/x86_64-amazon-linux/lib/libgfortran.so failed
    attempt to open /usr/x86_64-amazon-linux/lib/libgfortran.a failed
    attempt to open /usr/local/lib/libgfortran.so failed
    attempt to open /usr/local/lib/libgfortran.a failed
    attempt to open /lib/libgfortran.so failed
    attempt to open /lib/libgfortran.a failed
    attempt to open /usr/lib/libgfortran.so failed
    attempt to open /usr/lib/libgfortran.a failed
    ld: cannot find -lgfortran


    yum info gcc64-gfortran.x86_64 says that my installation of gfortran is at version 6.4.1 from amzn-main.










    share|improve this question

























      0












      0








      0








      I am working on a project that uses the package plotly in R.
      When I tried installing plotly, hexbin (a dependency) would not compile, because it could not find the gfortran .so libraries.
      I have already installed gfortran (gcc64-gfortran.x86_64), but the .so files are not installed or discoverable by ld. Here is the relevant part of the log:



      $ R
      > install.packages("hexbin", repos = "http://cran.rstudio.com/")
      Installing package into ‘/home/ec2-user/R/x86_64-redhat-linux-gnu-library/3.4’

      ...

      gcc -m64 -std=gnu99 -shared -L/usr/lib64/R/lib -L/usr/local/lib64 -o hexbin.so hbin.o hcell.o herode.o hsm.o reg.o -lgfortran -lm -lquadmath - L/usr/lib64/R/lib -lR
      /usr/bin/ld: cannot find -lgfortran
      /usr/bin/ld: cannot find -lquadmath
      collect2: error: ld returned 1 exit status


      Running ld -lgfortran --verbose gives me this:



      ...

      ==================================================
      attempt to open /usr/x86_64-amazon-linux/lib64/libgfortran.so failed
      attempt to open /usr/x86_64-amazon-linux/lib64/libgfortran.a failed
      attempt to open /usr/lib64/libgfortran.so failed
      attempt to open /usr/lib64/libgfortran.a failed
      attempt to open /usr/local/lib64/libgfortran.so failed
      attempt to open /usr/local/lib64/libgfortran.a failed
      attempt to open /lib64/libgfortran.so failed
      attempt to open /lib64/libgfortran.a failed
      attempt to open /usr/x86_64-amazon-linux/lib/libgfortran.so failed
      attempt to open /usr/x86_64-amazon-linux/lib/libgfortran.a failed
      attempt to open /usr/local/lib/libgfortran.so failed
      attempt to open /usr/local/lib/libgfortran.a failed
      attempt to open /lib/libgfortran.so failed
      attempt to open /lib/libgfortran.a failed
      attempt to open /usr/lib/libgfortran.so failed
      attempt to open /usr/lib/libgfortran.a failed
      ld: cannot find -lgfortran


      yum info gcc64-gfortran.x86_64 says that my installation of gfortran is at version 6.4.1 from amzn-main.










      share|improve this question














      I am working on a project that uses the package plotly in R.
      When I tried installing plotly, hexbin (a dependency) would not compile, because it could not find the gfortran .so libraries.
      I have already installed gfortran (gcc64-gfortran.x86_64), but the .so files are not installed or discoverable by ld. Here is the relevant part of the log:



      $ R
      > install.packages("hexbin", repos = "http://cran.rstudio.com/")
      Installing package into ‘/home/ec2-user/R/x86_64-redhat-linux-gnu-library/3.4’

      ...

      gcc -m64 -std=gnu99 -shared -L/usr/lib64/R/lib -L/usr/local/lib64 -o hexbin.so hbin.o hcell.o herode.o hsm.o reg.o -lgfortran -lm -lquadmath - L/usr/lib64/R/lib -lR
      /usr/bin/ld: cannot find -lgfortran
      /usr/bin/ld: cannot find -lquadmath
      collect2: error: ld returned 1 exit status


      Running ld -lgfortran --verbose gives me this:



      ...

      ==================================================
      attempt to open /usr/x86_64-amazon-linux/lib64/libgfortran.so failed
      attempt to open /usr/x86_64-amazon-linux/lib64/libgfortran.a failed
      attempt to open /usr/lib64/libgfortran.so failed
      attempt to open /usr/lib64/libgfortran.a failed
      attempt to open /usr/local/lib64/libgfortran.so failed
      attempt to open /usr/local/lib64/libgfortran.a failed
      attempt to open /lib64/libgfortran.so failed
      attempt to open /lib64/libgfortran.a failed
      attempt to open /usr/x86_64-amazon-linux/lib/libgfortran.so failed
      attempt to open /usr/x86_64-amazon-linux/lib/libgfortran.a failed
      attempt to open /usr/local/lib/libgfortran.so failed
      attempt to open /usr/local/lib/libgfortran.a failed
      attempt to open /lib/libgfortran.so failed
      attempt to open /lib/libgfortran.a failed
      attempt to open /usr/lib/libgfortran.so failed
      attempt to open /usr/lib/libgfortran.a failed
      ld: cannot find -lgfortran


      yum info gcc64-gfortran.x86_64 says that my installation of gfortran is at version 6.4.1 from amzn-main.







      linux redhat-enterprise-linux amazon-web-services amazon-ec2 r






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Jan 12 at 0:24









      Mason JonesMason Jones

      31




      31






















          2 Answers
          2






          active

          oldest

          votes


















          1














          I had the same issue with a standard AWS Linux instance.

          I had to link both, gfortran and quadmath:



          sudo ln -s /usr/lib/gcc/x86_64-amazon-linux/6.4.1/libquadmath.so /usr/lib/libquadmath.so





          share|improve this answer


























          • Sorry! I forgot to mention libquadmath as well! +1

            – Mason Jones
            Jan 16 at 23:36



















          0














          I found the problem. When I searched for the .so fortran file, I used the find command incorrectly.
          I was using find / -file gfortran.so instead of find / -file *gfortran*. I simply linked it with sudo ln -s /usr/lib/gcc/x86_64-amazon-linux/6.4.1/libgfortran.so /usr/lib/libgfortran.so, and now the link is resolved.






          share|improve this answer























            Your Answer








            StackExchange.ready(function() {
            var channelOptions = {
            tags: "".split(" "),
            id: "3"
            };
            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',
            autoActivateHeartbeat: false,
            convertImagesToLinks: true,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            bindNavPrevention: true,
            postfix: "",
            imageUploader: {
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            },
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            });


            }
            });














            draft saved

            draft discarded


















            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1393388%2fcannot-install-hexbin-library-r-on-aws-instance%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown

























            2 Answers
            2






            active

            oldest

            votes








            2 Answers
            2






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            1














            I had the same issue with a standard AWS Linux instance.

            I had to link both, gfortran and quadmath:



            sudo ln -s /usr/lib/gcc/x86_64-amazon-linux/6.4.1/libquadmath.so /usr/lib/libquadmath.so





            share|improve this answer


























            • Sorry! I forgot to mention libquadmath as well! +1

              – Mason Jones
              Jan 16 at 23:36
















            1














            I had the same issue with a standard AWS Linux instance.

            I had to link both, gfortran and quadmath:



            sudo ln -s /usr/lib/gcc/x86_64-amazon-linux/6.4.1/libquadmath.so /usr/lib/libquadmath.so





            share|improve this answer


























            • Sorry! I forgot to mention libquadmath as well! +1

              – Mason Jones
              Jan 16 at 23:36














            1












            1








            1







            I had the same issue with a standard AWS Linux instance.

            I had to link both, gfortran and quadmath:



            sudo ln -s /usr/lib/gcc/x86_64-amazon-linux/6.4.1/libquadmath.so /usr/lib/libquadmath.so





            share|improve this answer















            I had the same issue with a standard AWS Linux instance.

            I had to link both, gfortran and quadmath:



            sudo ln -s /usr/lib/gcc/x86_64-amazon-linux/6.4.1/libquadmath.so /usr/lib/libquadmath.so






            share|improve this answer














            share|improve this answer



            share|improve this answer








            edited Jan 16 at 21:28









            zx485

            973813




            973813










            answered Jan 16 at 20:34









            JasonJason

            261




            261













            • Sorry! I forgot to mention libquadmath as well! +1

              – Mason Jones
              Jan 16 at 23:36



















            • Sorry! I forgot to mention libquadmath as well! +1

              – Mason Jones
              Jan 16 at 23:36

















            Sorry! I forgot to mention libquadmath as well! +1

            – Mason Jones
            Jan 16 at 23:36





            Sorry! I forgot to mention libquadmath as well! +1

            – Mason Jones
            Jan 16 at 23:36













            0














            I found the problem. When I searched for the .so fortran file, I used the find command incorrectly.
            I was using find / -file gfortran.so instead of find / -file *gfortran*. I simply linked it with sudo ln -s /usr/lib/gcc/x86_64-amazon-linux/6.4.1/libgfortran.so /usr/lib/libgfortran.so, and now the link is resolved.






            share|improve this answer




























              0














              I found the problem. When I searched for the .so fortran file, I used the find command incorrectly.
              I was using find / -file gfortran.so instead of find / -file *gfortran*. I simply linked it with sudo ln -s /usr/lib/gcc/x86_64-amazon-linux/6.4.1/libgfortran.so /usr/lib/libgfortran.so, and now the link is resolved.






              share|improve this answer


























                0












                0








                0







                I found the problem. When I searched for the .so fortran file, I used the find command incorrectly.
                I was using find / -file gfortran.so instead of find / -file *gfortran*. I simply linked it with sudo ln -s /usr/lib/gcc/x86_64-amazon-linux/6.4.1/libgfortran.so /usr/lib/libgfortran.so, and now the link is resolved.






                share|improve this answer













                I found the problem. When I searched for the .so fortran file, I used the find command incorrectly.
                I was using find / -file gfortran.so instead of find / -file *gfortran*. I simply linked it with sudo ln -s /usr/lib/gcc/x86_64-amazon-linux/6.4.1/libgfortran.so /usr/lib/libgfortran.so, and now the link is resolved.







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Jan 12 at 19:40









                Mason JonesMason Jones

                31




                31






























                    draft saved

                    draft discarded




















































                    Thanks for contributing an answer to Super User!


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid



                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.


                    To learn more, see our tips on writing great answers.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function () {
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1393388%2fcannot-install-hexbin-library-r-on-aws-instance%23new-answer', 'question_page');
                    }
                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    Popular posts from this blog

                    If I really need a card on my start hand, how many mulligans make sense? [duplicate]

                    Alcedinidae

                    Can an atomic nucleus contain both particles and antiparticles? [duplicate]