3
$\begingroup$

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.

$\endgroup$
6
  • 2
    $\begingroup$ It can't find gfortran. Is it installed? $\endgroup$
    – kmm
    Nov 28 '17 at 2:08
  • 2
    $\begingroup$ I'm voting to close this question as off-topic because it is not a question about biology, but rather about software installation. $\endgroup$
    – kmm
    Nov 28 '17 at 2:08
  • $\begingroup$ In a way you are right. The issue is that this question is more appropriate here rather than on stackoverflow because bioinformaticians are here $\endgroup$
    – Nikita Vlasenko
    Nov 28 '17 at 2:14
  • $\begingroup$ I tried installing gfortran with sudo apt-get install gfortran but it is already there, so nothing happened. $\endgroup$
    – Nikita Vlasenko
    Nov 28 '17 at 2:18
  • $\begingroup$ Do you have r-base-dev installed? It should get the necessary headers. $\endgroup$
    – kmm
    Nov 28 '17 at 2:25
2
$\begingroup$

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
$\endgroup$
1
  • $\begingroup$ It is giving me Unable to locate package r-cran-rcpparmadillo $\endgroup$
    – Nikita Vlasenko
    Nov 28 '17 at 3:07
1
$\begingroup$

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
$\endgroup$
1
  • 2
    $\begingroup$ This feels like a dirty hack — better fix your GCC installation. $\endgroup$ Dec 7 '17 at 11:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.