Question: Error In Installing Deseq
1
gravatar for Medhat
3.6 years ago by
Medhat6.9k
Poland
Medhat6.9k wrote:

Hi,

I am trying to install DESeq In Rstudio 0.97.555 on ubuntu 12.04 Using this command;

source("http://bioconductor.org/biocLite.R")
biocLite("DESeq")

But It gives me this error:

/usr/bin/ld: cannot find -lgfortran
collect2: error: ld returned 1 exit status
make: *** [genefilter.so] Error 1
ERROR: compilation failed for package ‘genefilter’
* removing ‘/home/medhat/R/x86_64-pc-linux-gnu-library/3.0/genefilter’
ERROR: dependency ‘genefilter’ is not available for package ‘DESeq’
* removing ‘/home/medhat/R/x86_64-pc-linux-gnu-library/3.0/DESeq’
    The downloaded source packages are in
    ‘/tmp/RtmpW5TUyM/downloaded_packages’
Old packages: 'VGAM'

I tried to install genefilter Using:

biocLite("genefilter")

It raises this Error:

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

The downloaded source packages are in
    ‘/tmp/RtmpW5TUyM/downloaded_packages’
Old packages: 'VGAM'

Lastly I tried to install VGAM:

install.packages("VGAM")

Error:

/usr/bin/ld: cannot find -lgfortran
collect2: error: ld returned 1 exit status
make: *** [VGAM.so] Error 1
ERROR: compilation failed for package ‘VGAM’
* removing ‘/home/medhat/R/x86_64-pc-linux-gnu-library/3.0/VGAM’
* restoring previous ‘/home/medhat/R/x86_64-pc-linux-gnu-library/3.0/VGAM’
Warning in install.packages :
  installation of package ‘VGAM’ had non-zero exit status

The downloaded source packages are in
    ‘/tmp/RtmpW5TUyM/downloaded_packages’

any clue?

The answer is:

sudo ln -s /usr/lib/x86_64-linux-gnu/libgfortran.so.3 /usr/lib/libgfortran.so
R deseq rna-seq • 5.9k views
ADD COMMENTlink modified 3.6 years ago • written 3.6 years ago by Medhat6.9k
/usr/bin/ld: cannot find -lgfortran
collect2: error: ld returned 1 exit status

Are you sure that fortran libraries are installed ?

ADD REPLYlink written 3.6 years ago by Sudeep1.5k

$ which gfortran

/usr/bin/gfortran

ADD REPLYlink modified 3.6 years ago • written 3.6 years ago by Medhat6.9k
2
gravatar for Devon Ryan
3.6 years ago by
Devon Ryan70k
Freiburg, Germany
Devon Ryan70k wrote:

Firstly, you'd do wise to use DESeq2 rather than DESeq (the authors themselves advise that).

More to the point, while you have gfortran installed, that doesn't mean you have the libraries for gfortran installed. Yes, one would think that these would be installed as part of the same package, but that's not how it works on ubuntu. If you instead installed gfortran-4.6 or something like that then the libraries would be available under /usr/lib/gcc/x86_64-linux-gnu/4.6/ or similar.

It's actually interesting that gfortran is even required. I would guess that the package doesn't require it but that R adds it by default.

ADD COMMENTlink written 3.6 years ago by Devon Ryan70k

Thanks a lot for sharing first I installed gfortran-4.6 Like this

sudo apt-get install gfortran-4.6
Reading package lists... Done
Building dependency tree       
Reading state information... Done
gfortran-4.6 is already the newest version.

 which gfortran-4.6
/usr/bin/gfortran-4.6

Is that means that the library exist?

Second I installed DESeq2

biocLite("DESeq2")

but again

/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/medhat/R/x86_64-pc-linux-gnu-library/3.0/RcppArmadillo’
ERROR: dependencies ‘RcppArmadillo’, ‘genefilter’ are not available for package ‘DESeq2’
* removing ‘/home/medhat/R/x86_64-pc-linux-gnu-library/3.0/DESeq2’

The downloaded source packages are in
    ‘/tmp/RtmpPB7kWz/downloaded_packages’
Old packages: 'VGAM'
Update all/some/none? [a/s/n]:
ADD REPLYlink modified 3.6 years ago • written 3.6 years ago by Medhat6.9k
1

You might also look through this thread on stack overflow.

ADD REPLYlink written 3.6 years ago by Devon Ryan70k
1

This is the Answer :D

sudo ln -s /usr/lib/x86_64-linux-gnu/libgfortran.so.3 /usr/lib/libgfortran.so

ADD REPLYlink written 3.6 years ago by Medhat6.9k

Sometimes it's the easy things... :)

ADD REPLYlink written 3.6 years ago by Devon Ryan70k

Is /usr/lib/gcc/x86_64-linux-gnu/4.6/ is in your LD_LIBRARY_PATH? I think R gets that from the shell, though you can also edit /usr/lib/R/etc/ldpaths.

ADD REPLYlink written 3.6 years ago by Devon Ryan70k

to be like this

: ${JAVA_HOME=/usr/lib/jvm/java-6-openjdk-amd64/jre}
: ${R_JAVA_LD_LIBRARY_PATH=${JAVA_HOME}/lib/amd64/server}
if test -n ""; then
: ${R_LD_LIBRARY_PATH=${R_HOME}/lib:}
else
: ${R_LD_LIBRARY_PATH=${R_HOME}/lib}
fi
if test -n "${R_JAVA_LD_LIBRARY_PATH}"; then
  R_LD_LIBRARY_PATH="${R_LD_LIBRARY_PATH}:${R_JAVA_LD_LIBRARY_PATH}"
fi
## This is DYLD_FALLBACK_LIBRARY_PATH on Darwin (OS X) and LD_LIBRARY_PATH elsewhere
if test -z "${LD_LIBRARY_PATH}"; then
  LD_LIBRARY_PATH="${R_LD_LIBRARY_PATH}"
else
  LD_LIBRARY_PATH="${R_LD_LIBRARY_PATH}:${LD_LIBRARY_PATH}"

fi
export LD_LIBRARY_PATH
ADD REPLYlink modified 3.6 years ago • written 3.6 years ago by Medhat6.9k
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: 690 users visited in the last hour