0

When I am trying to install RcppArmadillo BiocLite library in R, it is giving me the following error:

/usr/bin/ld: cannot find -lgfortran
collect2: error: ld returned 1 exit status
make: *** [RcppArmadillo.so] Error 1
ERROR: compilation failed for package ‘RcppArmadillo’
* removing ‘/home/nikita/R/x86_64-pc-linux-gnu-library/3.2/RcppArmadillo’

I am using Ubuntu 12.04, R - 3.2.5 and g++-5.4. Any help would be greatly appreciated.

Nikita Vlasenko
  • 4,004
  • 7
  • 47
  • 87

1 Answers1

0

OK, I found a similar question on stackoverflow:

Building R package getting error "ld: cannot find -lgfortran "

and the solution was to create a symlink as described by kevin there:

sudo ln -s /usr/lib/x86_64-linux-gnu/libgfortran.so.3 /usr/lib/libgfortran.so
Nikita Vlasenko
  • 4,004
  • 7
  • 47
  • 87