rdebianinstall.packagescheckpoint

`Error in library(checkpoint) : there is no package called ‘checkpoint’` when run R script


My system is debian 10,test script as below:

me@pc:~$ cat << EOF >> packages.r
#!/usr/bin/Rscript
install.packages('checkpoint',quiet=TRUE,lib='/home/me/R/x86_64-pc-linux-gnu-library/3.5')
library(checkpoint)
checkpoint::setSnapshot("2020-08-26")
EOF

me@pc:~$ ./packages.r
./packages.r
also installing the dependencies ‘curl’, ‘pkgcache’, ‘pkgdepends’

Warning messages:
1: In install.packages("checkpoint", quiet = TRUE, lib = "/home/me/R/x86_64-pc-linux-gnu-library/3.5") :
  installation of package ‘curl’ had non-zero exit status
2: In install.packages("checkpoint", quiet = TRUE, lib = "/home/me/R/x86_64-pc-linux-gnu-library/3.5") :
  installation of package ‘pkgcache’ had non-zero exit status
3: In install.packages("checkpoint", quiet = TRUE, lib = "/home/me/R/x86_64-pc-linux-gnu-library/3.5") :
  installation of package ‘pkgdepends’ had non-zero exit status
4: In install.packages("checkpoint", quiet = TRUE, lib = "/home/me/R/x86_64-pc-linux-gnu-library/3.5") :
  installation of package ‘checkpoint’ had non-zero exit status
Error in library(checkpoint) : there is no package called ‘checkpoint’
Execution halted

As package checkpoint cannot be installed correctly,I try to install it in R shell directly:

me@pc:~$ R
R

R version 3.5.2 (2018-12-20) -- "Eggshell Igloo"
Copyright (C) 2018 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

  Natural language support but running in an English locale

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> install.packages('checkpoint',quiet=TRUE,lib='/home/me/R/x86_64-pc-linux-gnu-library/3.5')
also installing the dependencies ‘curl’, ‘pkgcache’, ‘pkgdepends’

Warning messages:
1: In install.packages("checkpoint", quiet = TRUE, lib = "/home/me/R/x86_64-pc-linux-gnu-library/3.5") :
  installation of package ‘curl’ had non-zero exit status
2: In install.packages("checkpoint", quiet = TRUE, lib = "/home/me/R/x86_64-pc-linux-gnu-library/3.5") :
  installation of package ‘pkgcache’ had non-zero exit status
3: In install.packages("checkpoint", quiet = TRUE, lib = "/home/me/R/x86_64-pc-linux-gnu-library/3.5") :
  installation of package ‘pkgdepends’ had non-zero exit status
4: In install.packages("checkpoint", quiet = TRUE, lib = "/home/me/R/x86_64-pc-linux-gnu-library/3.5") :
  installation of package ‘checkpoint’ had non-zero exit status

What's the problem when I install package checkpoint?


Solution

  • apt install libcurl4-openssl-dev first,then this problem solved.