Question: Problem in installing mclust package R
0
gravatar for Raheleh
11 weeks ago by
Raheleh50
Raheleh50 wrote:

Hello,

I tried to install mclust package R in RStudio using different ways

install.packages("mclust")
devtools::install_github("cran/mclust")
biocLite('mclust')

but I get this error:

* installing *source* package ‘mclust’ ...
** package ‘mclust’ successfully unpacked and MD5 sums checked
** libs
gcc -std=gnu99 -I/usr/share/R/include -DNDEBUG      -fpic  -g -O2 -fdebug-prefix-map=/build/r-base-Oe9izK/r-base-3.4.4=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c init.c -o init.o
gfortran   -fpic  -g -O2 -fdebug-prefix-map=/build/r-base-Oe9izK/r-base-3.4.4=. -fstack-protector-strong  -c mclust.f -o mclust.o
gfortran   -fpic  -g -O2 -fdebug-prefix-map=/build/r-base-Oe9izK/r-base-3.4.4=. -fstack-protector-strong  -c mclustaddson.f -o mclustaddson.o
g++ -shared -L/usr/lib/R/lib -Wl,-Bsymbolic-functions -Wl,-z,relro -o mclust.so init.o mclust.o mclustaddson.o -llapack -lblas -lgfortran -lm -lquadmath -lgfortran -lm -lquadmath -L/usr/lib/R/lib -lR
/usr/bin/ld: cannot find -lgfortran
/usr/bin/ld: cannot find -lgfortran
collect2: error: ld returned 1 exit status
/usr/share/R/share/make/shlib.mk:6: recipe for target 'mclust.so' failed
make: *** [mclust.so] Error 1
ERROR: compilation failed for package ‘mclust’
* removing ‘/home/mohammadi/R/x86_64-pc-linux-gnu-library/3.4/mclust’
Warning in install.packages :
  installation of package ‘mclust’ had non-zero exit status

Can anyone help me out? Many thanks!

mclust lgfortran R • 204 views
ADD COMMENTlink modified 11 weeks ago by Jean-Karim Heriche18k • written 11 weeks ago by Raheleh50
2
gravatar for Jean-Karim Heriche
11 weeks ago by
EMBL Heidelberg, Germany
Jean-Karim Heriche18k wrote:

This is not a bioinformatics question. Try on StackOverflow.

Anyway, the error message indicates that the compiler can't find the gfortran library. This is part of the gcc compiler suite but may have to be installed separately on some systems, e.g. on Ubuntu, try

sudo apt-get install gfortran
ADD COMMENTlink modified 10 weeks ago by zx87546.8k • written 11 weeks ago by Jean-Karim Heriche18k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1148 users visited in the last hour