bc-anaisabel / juniperus_paper

Pipeline for analyzing Illumina MiSeq paired-end data of fungal communities
BSD 2-Clause "Simplified" License
2 stars 1 forks source link

Installation of SpiecEasi package in R studio #19

Closed bc-anaisabel closed 3 years ago

bc-anaisabel commented 3 years ago

I am trying to install the package SpiecEasi running from Rstudio but I am not sure why it won't let me. I'm running R version 3.6.2 (2019-12-12) and Rstudio version 1.2.5033

This is how it looks like:

# I tried a couple of installations in different format
install.packages("devtools")
install.packages("remotes")
remotes::install_github("zdk123/SpiecEasi")

That didn't work because when I tried loading SpiecEasi in libraries it wouldn't find it. So I tried:

library(devtools)
install_github("zdk123/SpiecEasi")

But it wasn's successful because I got a few warnings and errors:

ld: warning: directory not found for option '-L/usr/local/gfortran/lib/gcc/x86_64-apple-darwin15/6.1.0'
ld: warning: directory not found for option '-L/usr/local/gfortran/lib'
ld: library not found for -lgfortran
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [SpiecEasi.so] Error 1
ERROR: compilation failed for package ‘SpiecEasi’
* removing ‘/Library/Frameworks/R.framework/Versions/3.6/Resources/library/SpiecEasi’
Error: Failed to install 'SpiecEasi' from GitHub:
  (converted from warning) installation of package ‘/var/folders/hw/4rqdr19j1d7dq7dbqx_w67rw0000gn/T//RtmpZsHP7d/file2a55ad5237d/SpiecEasi_1.1.0.tar.gz’ had non-zero exit status
In addition: Warning message:
1 components of `...` were not used.

We detected these problematic arguments:
* `username`

Did you misspecify an argument? 
bc-anaisabel commented 3 years ago

I have found this previous issue on the subject but their solution has not worked for me. Solution was to install another pacakage first:

install.packages("stringi")

But even after that it still does not let me install it:

ld: warning: directory not found for option '-L/usr/local/gfortran/lib/gcc/x86_64-apple-darwin15/6.1.0'
ld: warning: directory not found for option '-L/usr/local/gfortran/lib'
ld: library not found for -lgfortran
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [SpiecEasi.so] Error 1
ERROR: compilation failed for package ‘SpiecEasi’
* removing ‘/Library/Frameworks/R.framework/Versions/3.6/Resources/library/SpiecEasi’
Error: Failed to install 'SpiecEasi' from GitHub:
  (converted from warning) installation of package ‘/var/folders/hw/4rqdr19j1d7dq7dbqx_w67rw0000gn/T//RtmpNtbPmn/file7566196d833/SpiecEasi_1.1.0.tar.gz’ had non-zero exit status
valeriafloral commented 3 years ago

I have found this previous issue on the subject but their solution has not worked for me. Solution was to install another pacakage first:

install.packages("stringi")

But even after that it still does not let me install it:

ld: warning: directory not found for option '-L/usr/local/gfortran/lib/gcc/x86_64-apple-darwin15/6.1.0'
ld: warning: directory not found for option '-L/usr/local/gfortran/lib'
ld: library not found for -lgfortran
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [SpiecEasi.so] Error 1
ERROR: compilation failed for package ‘SpiecEasi’
* removing ‘/Library/Frameworks/R.framework/Versions/3.6/Resources/library/SpiecEasi’
Error: Failed to install 'SpiecEasi' from GitHub:
  (converted from warning) installation of package ‘/var/folders/hw/4rqdr19j1d7dq7dbqx_w67rw0000gn/T//RtmpNtbPmn/file7566196d833/SpiecEasi_1.1.0.tar.gz’ had non-zero exit status

It seems that there is a problem with the package gfortan. Here is a documentation about the installation in macOS

bc-anaisabel commented 3 years ago

So, we installed cran first so it could compile the files needed for this package. After that it seems that SpiecEasi installation was possible. But we get an error with one of the packages included in this installation: VGAM. The newer version of this package won't install in this way, we get the following message:

make: gfortran: No such file or directory
make: *** [ei.o] Error 1
ERROR: compilation failed for package ‘VGAM’
* removing ‘/Library/Frameworks/R.framework/Versions/3.6/Resources/library/VGAM’
* restoring previous ‘/Library/Frameworks/R.framework/Versions/3.6/Resources/library/VGAM’
Warning in install.packages :
  installation of package ‘VGAM’ had non-zero exit status

The downloaded source packages are in
    ‘/private/var/folders/hw/4rqdr19j1d7dq7dbqx_w67rw0000gn/T/Rtmp8fBAPz/downloaded_packages’
bc-anaisabel commented 3 years ago

It appears SpiecEasi is up and running with the binary version of VGAM. I am going to close this issue, if we encounter any other problems because of that VGAM thing I will update this.