Wednesday, May 1, 2024
 Popular · Latest · Hot · Upcoming
7
rated 0 times [  7] [ 0]  / answers: 1 / hits: 33046  / 2 Years ago, sun, november 6, 2022, 3:37:10

I'm trying to install a package in R (package "ks"). It fails with error message:



/usr/bin/ld: cannot find -lgfortran


I've already installed the Ubuntu package build-essential:



sudo apt-get install build-essential


I've also tried adding symbolic links:



sudo ln -s /usr/lib/x86_64-linux-gnu/libgfortran.so.3 /usr/lib/libgfortran.so
sudo ln -s /usr/lib/libgfortran.so.3.0.0 /usr/lib/libgfortran.so
sudo ldconfig


I use gcc and g++ regularly, but haven't yet had reason to use gfortran.



I've seen others with this problem on gcc-4.7 (http://ubuntuforums.org/showthread.php?t=2123821), so I wonder if this is from manually installing gcc-4.7. I followed the recipe from the accepted answer here here and here here.



Running lsb_release -a prints




Ubuntu 12.04.2 LTS




and running uname -r prints




3.2.0-39-generic-pae




Can anyone offer advice for why ld doesn't work?


More From » compiling

 Answers
7

You need to install gfortran. The error points out that the static lib for build-time linking is missing not the dynamic libs you tried to adjust.


[#31935] Monday, November 7, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
entmpy

Total Points: 52
Total Questions: 112
Total Answers: 113

Location: Marshall Islands
Member since Tue, Sep 21, 2021
3 Years ago
entmpy questions
;