Error In Installing Deseq
1
1
Entering edit mode
10.2 years ago
Medhat 9.7k

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
deseq rna-seq r • 11k views
ADD COMMENT
0
Entering edit mode
/usr/bin/ld: cannot find -lgfortran
collect2: error: ld returned 1 exit status

Are you sure that fortran libraries are installed ?

ADD REPLY
0
Entering edit mode

$ which gfortran

/usr/bin/gfortran

ADD REPLY
2
Entering edit mode
10.2 years ago

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 COMMENT
0
Entering edit mode

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 REPLY
1
Entering edit mode

You might also look through this thread on stack overflow.

ADD REPLY
1
Entering edit mode

This is the Answer :D

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

ADD REPLY
0
Entering edit mode

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

ADD REPLY
0
Entering edit mode

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 REPLY
0
Entering edit mode

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 REPLY

Login before adding your answer.

Traffic: 2058 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6