Error installing packages: UsingR
install.packages('UsingR')
Installing package into ‘/resources/common/R/Library’
(as ‘lib’ is unspecified)
also installing the dependency ‘Hmisc’
...
gcc -std=gnu99 -shared -L/usr/lib/R/lib -Wl,-z,relro -o Hmisc.so Hmisc.o cidxcn.o cidxcp.o hoeffd.o init.o jacklins.o largrec.o mChoice.o maxempr.o nstr.o ranksort.o rcorr.o string_box.o wclosest.o -lgfortran -lm -lquadmath -L/usr/lib/R/lib -lR
/usr/bin/ld: cannot find -lgfortran
collect2: error: ld returned 1 exit status
make: *** [/usr/share/R/share/make/shlib.mk:6: Hmisc.so] Error 1
I noticed that /usr/lib/libgfortran.so is a broken symbolic link.
rstudio@bc8a66fb9e33:/resources/rstudio$ ls -l /usr/lib/libgfortran.so
lrwxrwxrwx 1 root root 42 Aug 2 21:38 /usr/lib/libgfortran.so -> /usr/lib/x86_64-linux-gnu/libgfortran.so.3
rstudio@bc8a66fb9e33:/resources/rstudio$ ls -lH /usr/lib/libgfortran.so
ls: cannot access '/usr/lib/libgfortran.so': No such file or directory
rstudio@bc8a66fb9e33:/resources/rstudio$ ls -l /usr/lib/x8664-linux-gnu/libgfortran.so.*
lrwxrwxrwx 1 root root 20 Jul 12 08:16 /usr/lib/x8664-linux-gnu/libgfortran.so.4 -> libgfortran.so.4.0.0
-rw-r--r-- 1 root root 1919000 Jul 12 08:16 /usr/lib/x8664-linux-gnu/libgfortran.so.4.0.0
lrwxrwxrwx 1 root root 20 Jul 26 11:28 /usr/lib/x8664-linux-gnu/libgfortran.so.5 -> libgfortran.so.5.0.0
-rw-r--r-- 1 root root 2541880 Jul 26 11:28 /usr/lib/x86_64-linux-gnu/libgfortran.so.5.0.0
-
Anonymous commented
Hi, I have the same issue with "cannot find -lgfortran ". Did you solve it?
-
SANJAY KRISHNA DAS commented
I am also facing the same issue. Not able to load package plotly
/usr/bin/ld: cannot find -lgfortran
collect2: error: ld returned 1 exit status
make: *** [/usr/share/R/share/make/shlib.mk:6: hexbin.so] Error 1
ERROR: compilation failed for package ‘hexbin’
* removing ‘/resources/common/R/Library/hexbin’