I have R version 3.4.2, trying to install ggplot2
, ran install.packages("ggplot2", dependencies = TRUE)
in RStudio. It eventually tells me it exited with non-zero exit status and the errors are hard to read because the message is so long, but I see that in the process Matrix
was a dependency which also failed to install, so I try to directly install that, and here's what I see in the error message for that:
/usr/bin/ld: cannot find -llapack
/usr/bin/ld: cannot find -lblas
/usr/bin/ld: cannot find -lgfortran
collect2: error: ld returned 1 exit status
/usr/share/R/share/make/shlib.mk:6: recipe for target 'Matrix.so' failed
make: *** [Matrix.so] Error 1
ERROR: compilation failed for package ‘Matrix’
* removing ‘/usr/local/lib/R/site-library/Matrix’
I'm not clear on what ld
is at all and if I need to research that to solve this problem. It looks like it might alternately have something to do with Matrix.so
.
r-base-dev
among others. This package depends on the packages that provide the development files for the missing libraries. It's a duplicate indeed. – David Foerster Jul 19 '18 at 16:34gcc --version
g++ --version
andgfortran --version
sudo apt install gfortran-8
My package used gcc. I have version 8.4.0 – Shubham Gupta Jan 13 '21 at 12:36