3

When I am trying to install the RcppArmadillo Bioconductor 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.

Konrad Rudolph
  • 4,845
  • 14
  • 45
Nikita Vlasenko
  • 2,558
  • 3
  • 26
  • 38
  • 2
    It can't find gfortran. Is it installed? –  Nov 28 '17 at 02:08
  • 2
    I'm voting to close this question as off-topic because it is not a question about biology, but rather about software installation. –  Nov 28 '17 at 02:08
  • In a way you are right. The issue is that this question is more appropriate here rather than on stackoverflow because bioinformaticians are here –  Nov 28 '17 at 02:14
  • I tried installing gfortran with sudo apt-get install gfortran but it is already there, so nothing happened. –  Nov 28 '17 at 02:18
  • Do you have r-base-dev installed? It should get the necessary headers. –  Nov 28 '17 at 02:25
  • @NikitaVlasenko There is a bioinformatics.se... –  Dec 05 '17 at 19:46

2 Answers2

2

On Ubuntu 14.04 there is a direct route to installing RcppArmadillo. You could perhaps try the same syntax.

sudo apt-get update
sudo apt-get install r-cran-rcpparmadillo
1

I found a similar question on stackoverflow 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
llrs
  • 4,693
  • 1
  • 18
  • 42
Nikita Vlasenko
  • 2,558
  • 3
  • 26
  • 38