AnantharamanLab / METABOLIC

A scalable high-throughput metabolic and biogeochemical functional trait profiler
179 stars 45 forks source link

Issues installing required R packages #183

Open brauliovill opened 7 months ago

brauliovill commented 7 months ago

I'm trying to install the required packages for R on a remote linux server. I installed R within a conda environment using conda install -c conda-forge r-base=3.6.0 This is "R version 3.6.0 (2019-04-26)"

I then entered R and tried to install diagram: R install.packages("diagram", version='1.6.4')

This gave me the following error

* installing *source* package ‘shape’ ...
** package ‘shape’ successfully unpacked and MD5 sums checked
** using staged installation
** R
** demo
** inst
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
** building package indices
** installing vignettes
** testing if installed package can be loaded from temporary location
mv: cannot move ‘/home/path/to/conda/environment/lib/R/library/00LOCK-shape/00new/shape’ to ‘/home/path/to/conda/environment/lib/R/library/shape’: File exists
ERROR:   moving to final location failed
* removing ‘/home/path/to/conda/environment/lib/R/library/shape’
ERROR: dependency ‘shape’ is not available for package ‘diagram’
* removing ‘/home/path/to/conda/environment/lib/R/library/diagram’

The downloaded source packages are in
    ‘/tmp/RtmpXqie1E/downloaded_packages’
Updating HTML index of packages in '.Library'
Making 'packages.html' ... done
Warning messages:
1: In install.packages("diagram", version = "1.6.4") :
  installation of package ‘shape’ had non-zero exit status
2: In install.packages("diagram", version = "1.6.4") :
  installation of package ‘diagram’ had non-zero exit status

The package was not installed so I am trying to figure out what I could be doing wrong as I hope to successfully install these R dependencies.

LucahGrey commented 3 months ago

I had to install all of the packages from source like this:

R
<package> = ("https://cran.r-project.org/src/contrib/Archive/<package>/<package>_<version>.tar.gz")
install.packages(<package>, repos=NULL, type="source")
packageVersion("<package>")

The last line is just to check to see if it properly installed

For diagram, this is

diagram = ("https://cran.r-project.org/src/contrib/Archive/diagram/diagram_1.6.4.tar.gz")
install.packages(diagram, repos=NULL, type="source")
packageVersion("diagram")

I have been able to get this to work for all R dependencies except the following:

If anyone has ideas to get these installed, please let me know too.