Warning in install.packages : installation of package ?spant? had non-zero exit status

running R (version 4.2.2) and R Studio (version 1.4.1717), with 10GB of memory. trying to install the toolbox "spant" on HPC cluster, and i get this error

Warning in install.packages: installation of package "spant" had non-zero exit status

what am i missing to fix this? i tried using devtools too, and it didnt work

this is the entire command window:
> install.packages("spant")
Installing package into ?/home/traaffneu/myname/R/x86_64-pc-linux-gnu-library/4.2?
(as ?lib? is unspecified)
also installing the dependencies ?testthat?, ?nloptr?

trying URL 'https://cran.rstudio.com/src/contrib/testthat_3.2.0.tar.gz'
Content type 'application/x-gzip' length 739497 bytes (722 KB)
==================================================
downloaded 722 KB

trying URL 'https://cran.rstudio.com/src/contrib/nloptr_2.0.3.tar.gz'
Content type 'application/x-gzip' length 2219877 bytes (2.1 MB)
==================================================
downloaded 2.1 MB

trying URL 'https://cran.rstudio.com/src/contrib/spant_2.16.0.tar.gz'
Content type 'application/x-gzip' length 4908377 bytes (4.7 MB)
==================================================
downloaded 4.7 MB

ERROR: failed to lock directory ?/home/traaffneu/myname/R/x86_64-pc-linux-gnu-library/4.2? for modifying
Try removing ?/home/traaffneu/myname/R/x86_64-pc-linux-gnu-library/4.2/00LOCK-testthat?
Warning in install.packages :

  • installation of package ?testthat? had non-zero exit status*
    ERROR: dependency ?testthat? is not available for package ?nloptr?
    ** removing ?/home/traaffneu/myname/R/x86_64-pc-linux-gnu-library/4.2/nloptr?*
    Warning in install.packages :
  • installation of package ?nloptr? had non-zero exit status*
    ERROR: dependency ?nloptr? is not available for package ?spant?
    ** removing ?/home/traaffneu/myname/R/x86_64-pc-linux-gnu-library/4.2/spant?*
    Warning in install.packages :
  • installation of package ?spant? had non-zero exit status*

The downloaded source packages are in

  • ?/scratch/myname/50755618.dccn-l029.dccn.nl/Rtmpyt6poN/downloaded_packages?*
    Warning message:
    R graphics engine version 15 is not supported by this version of RStudio. The Plots tab will be disabled until a newer version of RStudio is installed.

any help is greatly appreciated !!!!

Try

install.packages(testthat)

Try deleting the /home/traaffneu/myname/R/x86_64-pc-linux-gnu-library/4.2/00LOCK-testthat file, like the error message suggests, and then retry the whole installation.

You can also try using the pak package, which is more robust to these issues. See this page fore installation: Another Approach to Package Installation • pak

1 Like

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.