Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issues installing required R packages #183

Open
brauliovill opened this issue Apr 18, 2024 · 1 comment
Open

Issues installing required R packages #183

brauliovill opened this issue Apr 18, 2024 · 1 comment

Comments

@brauliovill
Copy link

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
Copy link

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:

  • ggraph (v2.0.2)
  • pdftools (v2.3)
  • igraph (v1.2.5)
  • tidygraph (v1.1.2)
  • dplyr (v0.8.5)

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants