R: renv::restore() 抛出奇怪的错误信息 ("character(0)")

R: renv::restore() throwing strange error messages ("character(0)")

我正在尝试将 renv 更改为 运行,以便在不同的系统上恢复项目的库。

这是我的工作流程:

然而,即使对于简单的 CRAN 包,它也会抛出奇怪的错误:

> renv::restore()

[... package list removed...]

Do you want to proceed? [y/N]: y
Retrieving 'https://api.github.com/repos/rstudio/renv/tarball/e996b619471ea5174322e1287f94fcc3cf026010' ...
    OK [file is up to date]
Retrieving 'https://mran.microsoft.com/src/contrib/boot_1.3-25.tar.gz' ...
    OK [file is up to date]
Retrieving 'https://mran.microsoft.com/src/contrib/lattice_0.20-41.tar.gz' ...
    OK [file is up to date]
The following error(s) occurred while retrieving 'MASS':

    - character(0)

Error: failed to retrieve package 'MASS'

我不知道如何处理该错误消息。我尝试了其他存储库源(例如 MRAN),但没有成功。

知道可能出了什么问题吗?

非常感谢, 一月

renv::diagnostics() 输出:

> renv::diagnostics()
Diagnostics Report -- renv [0.12.3-64]
======================================

# Session Info =======================
R version 3.6.3 (2020-02-29)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Debian GNU/Linux 10 (buster)

Matrix products: default
BLAS/LAPACK: /usr/lib/x86_64-linux-gnu/libopenblasp-r0.3.5.so

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C              
 [3] LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8    
 [5] LC_MONETARY=en_US.UTF-8    LC_MESSAGES=C             
 [7] LC_PAPER=en_US.UTF-8       LC_NAME=C                 
 [9] LC_ADDRESS=C               LC_TELEPHONE=C            
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C       

attached base packages:
[1] stats     graphics  grDevices datasets  utils     methods   base     

loaded via a namespace (and not attached):
[1] compiler_3.6.3 tools_3.6.3    renv_0.12.3-64

# Project ============================
Project path: "~/renv_testing"

# Status =============================
The following package(s) are no longer used in this project:
                 _
  BH               [1.72.0-3]
  BiocGenerics     [0.32.0]
  BiocManager      [1.30.10]
  BiocParallel     [1.20.1]
  BiocVersion      [3.10.1]
  DBI              [1.1.0]
  Formula          [1.2-4]
  GeneNet          [1.2.15]
  Hmisc            [4.4-2]
  MASS             [7.3-51.6]
  Matrix           [1.2-18]
  MatrixModels     [0.4-1]
  R.methodsS3      [1.8.1]
  R.oo             [1.24.0]
  R.utils          [2.10.1]
  R6               [2.5.0]
  RColorBrewer     [1.1-2]
  RCy3             [2.6.3]
  RJSONIO          [1.3-1.4]
  Rcpp             [1.0.5]
  RcppArmadillo    [0.9.900.2.0]
  RcppEigen        [0.3.3.9.1]
  Rdpack           [2.1]
  SparseM          [1.78]
  XML              [3.99-0.3]
  abind            [1.4-5]
  askpass          [1.1]
  assertthat       [0.2.1]
  backports        [1.2.1]
  base64enc        [0.1-3]
  blob             [1.2.1]
  boot             [1.3-25]
  brio             [1.1.0]
  broom            [0.7.3]
  callr            [3.5.1]
  car              [3.0-9]
  carData          [3.0-4]
  cellranger       [1.1.0]
  checkmate        [2.0.0]
  cli              [2.2.0]
  clipr            [0.7.1]
  cluster          [2.1.0]
  colorspace       [2.0-0]
  conquer          [1.0.1]
  corpcor          [1.6.9]
  corrplot         [0.84]
  cowplot          [1.0.0]
  cpp11            [0.2.4]
  crayon           [1.3.4]
  curl             [4.3]
  data.table       [1.13.4]
  dbplyr           [2.0.0]
  desc             [1.2.0]
  diffobj          [0.3.2]
  digest           [0.6.27]
  dplyr            [1.0.2]
  ellipsis         [0.3.1]
  evaluate         [0.14]
  fansi            [0.4.1]
  farver           [2.0.3]
  fdrtool          [1.2.15]
  forcats          [0.5.0]
  foreign          [0.8-76]
  formatR          [1.7]
  fs               [1.5.0]
  futile.logger    [1.4.3]
  futile.options   [1.0.1]
  gbRd             [0.4-11]
  generics         [0.1.0]
  ggplot2          [3.3.2]
  ggrepel          [0.9.0]
  ggsci            [2.9]
  ggsignif         [0.6.0]
  glue             [1.4.2]
  graph            [1.64.0]
  gridExtra        [2.3]
  gtable           [0.3.0]
  haven            [2.3.1]
  highr            [0.8]
  hms              [0.5.3]
  htmlTable        [2.1.0]
  htmltools        [0.5.0]
  htmlwidgets      [1.5.3]
  httr             [1.4.2]
  igraph           [1.2.6]
  isoband          [0.2.3]
  jpeg             [0.1-8.1]
  jsonlite         [1.7.2]
  knitr            [1.30]
  labeling         [0.4.2]
  lambda.r         [1.2.4]
  lattice          [0.20-41]
  latticeExtra     [0.6-29]
  lifecycle        [0.2.0]
  lme4             [1.1-26]
  longitudinal     [1.1.12]
  lubridate        [1.7.9.2]
  magrittr         [2.0.1]
  maptools         [1.0-1]
  markdown         [1.1]
  matrixStats      [0.57.0]
  mgcv             [1.8-31]
  mime             [0.9]
  minqa            [1.2.4]
  modelr           [0.1.8]
  munsell          [0.5.0]
  nlme             [3.1-148]
  nloptr           [1.2.2.2]
  nnet             [7.3-14]
  openssl          [1.4.3]
  openxlsx         [4.2.3]
  pbkrtest         [0.4-8.6]
  pillar           [1.4.7]
  pkgbuild         [1.2.0]
  pkgconfig        [2.0.3]
  pkgload          [1.1.0]
  png              [0.1-7]
  polynom          [1.4-0]
  praise           [1.0.0]
  prettyunits      [1.1.1]
  processx         [3.4.5]
  progress         [1.2.2]
  ps               [1.5.0]
  purrr            [0.3.4]
  quantreg         [5.61]
  rbibutils        [2.0]
  readr            [1.4.0]
  readxl           [1.3.1]
  rematch          [1.0.1]
  rematch2         [2.1.2]
  reprex           [0.3.0]
  rio              [0.5.16]
  rlang            [0.4.9]
  rmarkdown        [2.6]
  rpart            [4.1-15]
  rprojroot        [2.0.2]
  rstatix          [0.6.0]
  rstudioapi       [0.13]
  rvest            [0.3.6]
  scales           [1.1.1]
  selectr          [0.4-2]
  snow             [0.4-3]
  sp               [1.4-2]
  statmod          [1.4.35]
  stringi          [1.5.3]
  stringr          [1.4.0]
  survival         [3.2-3]
  sys              [3.4]
  testthat         [3.0.1]
  tibble           [3.0.4]
  tidyr            [1.1.2]
  tidyselect       [1.1.0]
  tinytex          [0.28]
  utf8             [1.1.4]
  vctrs            [0.3.6]
  viridis          [0.5.1]
  viridisLite      [0.3.0]
  waldo            [0.2.3]
  whisker          [0.4]
  withr            [2.3.0]
  xfun             [0.19]
  xml2             [1.3.2]
  yaml             [2.2.1]
  zip              [2.1.1]

Use `renv::snapshot()` to remove them from the lockfile.

The following package(s) are recorded in the lockfile but not installed:
            _
  MoDentify   [krumsieklab/MoDentify@HEAD]
  ggpubr      [0.4.0]
  tidyverse   [1.3.0]

Use `renv::restore()` to install these packages.

The following package(s) are out of sync:

   Package   Lockfile Version   Library Version
      renv          0.12.3-64         0.12.3-64

Use `renv::snapshot()` to save the state of your library to the lockfile.
Use `renv::restore()` to restore your library from the lockfile.


# Packages ===========================
                 Library Source    Lockfile       Source Path Dependency
BH                  <NA>   <NA>    1.72.0-3         CRAN <NA>       <NA>
BiocGenerics        <NA>   <NA>      0.32.0 Bioconductor <NA>       <NA>
BiocManager         <NA>   <NA>     1.30.10         CRAN <NA>       <NA>
BiocParallel        <NA>   <NA>      1.20.1 Bioconductor <NA>       <NA>
BiocVersion         <NA>   <NA>      3.10.1 Bioconductor <NA>       <NA>
DBI                 <NA>   <NA>       1.1.0         CRAN <NA>       <NA>
Formula             <NA>   <NA>       1.2-4         CRAN <NA>       <NA>
GeneNet             <NA>   <NA>      1.2.15         CRAN <NA>       <NA>
Hmisc               <NA>   <NA>       4.4-2         CRAN <NA>       <NA>
KernSmooth       2.23-16   CRAN        <NA>         <NA>  [2]       <NA>
MASS            7.3-51.5   CRAN    7.3-51.6         CRAN  [2]       <NA>
Matrix            1.2-18   CRAN      1.2-18         CRAN  [2]       <NA>
MatrixModels        <NA>   <NA>       0.4-1         CRAN <NA>       <NA>
MoDentify           <NA>   <NA>      0.99.0       GitHub <NA>     direct
R.methodsS3         <NA>   <NA>       1.8.1         CRAN <NA>       <NA>
R.oo                <NA>   <NA>      1.24.0         CRAN <NA>       <NA>
R.utils             <NA>   <NA>      2.10.1         CRAN <NA>       <NA>
R6                  <NA>   <NA>       2.5.0         CRAN <NA>       <NA>
RColorBrewer        <NA>   <NA>       1.1-2         CRAN <NA>       <NA>
RCy3                <NA>   <NA>       2.6.3 Bioconductor <NA>       <NA>
RJSONIO             <NA>   <NA>     1.3-1.4         CRAN <NA>       <NA>
Rcpp                <NA>   <NA>       1.0.5         CRAN <NA>       <NA>
RcppArmadillo       <NA>   <NA> 0.9.900.2.0         CRAN <NA>       <NA>
RcppEigen           <NA>   <NA>   0.3.3.9.1         CRAN <NA>       <NA>
Rdpack              <NA>   <NA>         2.1         CRAN <NA>       <NA>
SparseM             <NA>   <NA>        1.78         CRAN <NA>       <NA>
XML                 <NA>   <NA>    3.99-0.3         CRAN <NA>       <NA>
abind               <NA>   <NA>       1.4-5         CRAN <NA>       <NA>
askpass             <NA>   <NA>         1.1         CRAN <NA>       <NA>
assertthat          <NA>   <NA>       0.2.1         CRAN <NA>       <NA>
backports           <NA>   <NA>       1.2.1         CRAN <NA>       <NA>
base64enc           <NA>   <NA>       0.1-3         CRAN <NA>       <NA>
blob                <NA>   <NA>       1.2.1         CRAN <NA>       <NA>
boot              1.3-24   CRAN      1.3-25         CRAN  [2]       <NA>
brio                <NA>   <NA>       1.1.0         CRAN <NA>       <NA>
broom               <NA>   <NA>       0.7.3         CRAN <NA>       <NA>
callr               <NA>   <NA>       3.5.1         CRAN <NA>       <NA>
car                 <NA>   <NA>       3.0-9         CRAN <NA>       <NA>
carData             <NA>   <NA>       3.0-4         CRAN <NA>       <NA>
cellranger          <NA>   <NA>       1.1.0         CRAN <NA>       <NA>
checkmate           <NA>   <NA>       2.0.0         CRAN <NA>       <NA>
class             7.3-15   CRAN        <NA>         <NA>  [2]       <NA>
cli                 <NA>   <NA>       2.2.0         CRAN <NA>       <NA>
clipr               <NA>   <NA>       0.7.1         CRAN <NA>       <NA>
cluster            2.1.0   CRAN       2.1.0         CRAN  [2]       <NA>
codetools         0.2-16   CRAN        <NA>         <NA>  [2]       <NA>
colorspace          <NA>   <NA>       2.0-0         CRAN <NA>       <NA>
conquer             <NA>   <NA>       1.0.1         CRAN <NA>       <NA>
corpcor             <NA>   <NA>       1.6.9         CRAN <NA>       <NA>
corrplot            <NA>   <NA>        0.84         CRAN <NA>       <NA>
cowplot             <NA>   <NA>       1.0.0         CRAN <NA>       <NA>
cpp11               <NA>   <NA>       0.2.4         CRAN <NA>       <NA>
crayon              <NA>   <NA>       1.3.4         CRAN <NA>       <NA>
curl                <NA>   <NA>         4.3         CRAN <NA>       <NA>
data.table          <NA>   <NA>      1.13.4         CRAN <NA>       <NA>
dbplyr              <NA>   <NA>       2.0.0         CRAN <NA>       <NA>
desc                <NA>   <NA>       1.2.0         CRAN <NA>       <NA>
diffobj             <NA>   <NA>       0.3.2         CRAN <NA>       <NA>
digest              <NA>   <NA>      0.6.27         CRAN <NA>       <NA>
dplyr               <NA>   <NA>       1.0.2         CRAN <NA>       <NA>
ellipsis            <NA>   <NA>       0.3.1         CRAN <NA>       <NA>
evaluate            <NA>   <NA>        0.14         CRAN <NA>       <NA>
fansi               <NA>   <NA>       0.4.1         CRAN <NA>       <NA>
farver              <NA>   <NA>       2.0.3         CRAN <NA>       <NA>
fdrtool             <NA>   <NA>      1.2.15         CRAN <NA>       <NA>
forcats             <NA>   <NA>       0.5.0         CRAN <NA>       <NA>
foreign           0.8-75   CRAN      0.8-76         CRAN  [2]       <NA>
formatR             <NA>   <NA>         1.7         CRAN <NA>       <NA>
fs                  <NA>   <NA>       1.5.0         CRAN <NA>       <NA>
futile.logger       <NA>   <NA>       1.4.3         CRAN <NA>       <NA>
futile.options      <NA>   <NA>       1.0.1         CRAN <NA>       <NA>
gbRd                <NA>   <NA>      0.4-11         CRAN <NA>       <NA>
generics            <NA>   <NA>       0.1.0         CRAN <NA>       <NA>
ggplot2             <NA>   <NA>       3.3.2         CRAN <NA>       <NA>
ggpubr              <NA>   <NA>       0.4.0         CRAN <NA>     direct
ggrepel             <NA>   <NA>       0.9.0         CRAN <NA>       <NA>
ggsci               <NA>   <NA>         2.9         CRAN <NA>       <NA>
ggsignif            <NA>   <NA>       0.6.0         CRAN <NA>       <NA>
glue                <NA>   <NA>       1.4.2         CRAN <NA>       <NA>
graph               <NA>   <NA>      1.64.0 Bioconductor <NA>       <NA>
gridExtra           <NA>   <NA>         2.3         CRAN <NA>       <NA>
gtable              <NA>   <NA>       0.3.0         CRAN <NA>       <NA>
haven               <NA>   <NA>       2.3.1         CRAN <NA>       <NA>
highr               <NA>   <NA>         0.8         CRAN <NA>       <NA>
hms                 <NA>   <NA>       0.5.3         CRAN <NA>       <NA>
htmlTable           <NA>   <NA>       2.1.0         CRAN <NA>       <NA>
htmltools           <NA>   <NA>       0.5.0         CRAN <NA>       <NA>
htmlwidgets         <NA>   <NA>       1.5.3         CRAN <NA>       <NA>
httr                <NA>   <NA>       1.4.2         CRAN <NA>       <NA>
igraph              <NA>   <NA>       1.2.6         CRAN <NA>       <NA>
isoband             <NA>   <NA>       0.2.3         CRAN <NA>       <NA>
jpeg                <NA>   <NA>     0.1-8.1         CRAN <NA>       <NA>
jsonlite            <NA>   <NA>       1.7.2         CRAN <NA>       <NA>
knitr               <NA>   <NA>        1.30         CRAN <NA>       <NA>
labeling            <NA>   <NA>       0.4.2         CRAN <NA>       <NA>
lambda.r            <NA>   <NA>       1.2.4         CRAN <NA>       <NA>
lattice          0.20-38   CRAN     0.20-41         CRAN  [2]       <NA>
latticeExtra        <NA>   <NA>      0.6-29         CRAN <NA>       <NA>
lifecycle           <NA>   <NA>       0.2.0         CRAN <NA>       <NA>
lme4                <NA>   <NA>      1.1-26         CRAN <NA>       <NA>
longitudinal        <NA>   <NA>      1.1.12         CRAN <NA>       <NA>
lubridate           <NA>   <NA>     1.7.9.2         CRAN <NA>       <NA>
magrittr            <NA>   <NA>       2.0.1         CRAN <NA>       <NA>
maptools            <NA>   <NA>       1.0-1         CRAN <NA>       <NA>
markdown            <NA>   <NA>         1.1         CRAN <NA>       <NA>
matrixStats         <NA>   <NA>      0.57.0         CRAN <NA>       <NA>
mgcv              1.8-31   CRAN      1.8-31         CRAN  [2]       <NA>
mime                <NA>   <NA>         0.9         CRAN <NA>       <NA>
minqa               <NA>   <NA>       1.2.4         CRAN <NA>       <NA>
modelr              <NA>   <NA>       0.1.8         CRAN <NA>       <NA>
munsell             <NA>   <NA>       0.5.0         CRAN <NA>       <NA>
nlme             3.1-144   CRAN     3.1-148         CRAN  [2]       <NA>
nloptr              <NA>   <NA>     1.2.2.2         CRAN <NA>       <NA>
nnet              7.3-12   CRAN      7.3-14         CRAN  [2]       <NA>
openssl             <NA>   <NA>       1.4.3         CRAN <NA>       <NA>
openxlsx            <NA>   <NA>       4.2.3         CRAN <NA>       <NA>
pbkrtest            <NA>   <NA>     0.4-8.6         CRAN <NA>       <NA>
pillar              <NA>   <NA>       1.4.7         CRAN <NA>       <NA>
pkgbuild            <NA>   <NA>       1.2.0         CRAN <NA>       <NA>
pkgconfig           <NA>   <NA>       2.0.3         CRAN <NA>       <NA>
pkgload             <NA>   <NA>       1.1.0         CRAN <NA>       <NA>
png                 <NA>   <NA>       0.1-7         CRAN <NA>       <NA>
polynom             <NA>   <NA>       1.4-0         CRAN <NA>       <NA>
praise              <NA>   <NA>       1.0.0         CRAN <NA>       <NA>
prettyunits         <NA>   <NA>       1.1.1         CRAN <NA>       <NA>
processx            <NA>   <NA>       3.4.5         CRAN <NA>       <NA>
progress            <NA>   <NA>       1.2.2         CRAN <NA>       <NA>
ps                  <NA>   <NA>       1.5.0         CRAN <NA>       <NA>
purrr               <NA>   <NA>       0.3.4         CRAN <NA>       <NA>
quantreg            <NA>   <NA>        5.61         CRAN <NA>       <NA>
rbibutils           <NA>   <NA>         2.0         CRAN <NA>       <NA>
readr               <NA>   <NA>       1.4.0         CRAN <NA>       <NA>
readxl              <NA>   <NA>       1.3.1         CRAN <NA>       <NA>
rematch             <NA>   <NA>       1.0.1         CRAN <NA>       <NA>
rematch2            <NA>   <NA>       2.1.2         CRAN <NA>       <NA>
renv           0.12.3-64   CRAN   0.12.3-64       GitHub  [1]     direct
reprex              <NA>   <NA>       0.3.0         CRAN <NA>       <NA>
rio                 <NA>   <NA>      0.5.16         CRAN <NA>       <NA>
rlang               <NA>   <NA>       0.4.9         CRAN <NA>       <NA>
rmarkdown           <NA>   <NA>         2.6         CRAN <NA>       <NA>
rpart             4.1-15   CRAN      4.1-15         CRAN  [2]       <NA>
rprojroot           <NA>   <NA>       2.0.2         CRAN <NA>       <NA>
rstatix             <NA>   <NA>       0.6.0         CRAN <NA>       <NA>
rstudioapi          <NA>   <NA>        0.13         CRAN <NA>       <NA>
rvest               <NA>   <NA>       0.3.6         CRAN <NA>       <NA>
scales              <NA>   <NA>       1.1.1         CRAN <NA>       <NA>
selectr             <NA>   <NA>       0.4-2         CRAN <NA>       <NA>
snow                <NA>   <NA>       0.4-3         CRAN <NA>       <NA>
sp                  <NA>   <NA>       1.4-2         CRAN <NA>       <NA>
spatial           7.3-11   CRAN        <NA>         <NA>  [2]       <NA>
statmod             <NA>   <NA>      1.4.35         CRAN <NA>       <NA>
stringi             <NA>   <NA>       1.5.3         CRAN <NA>       <NA>
stringr             <NA>   <NA>       1.4.0         CRAN <NA>       <NA>
survival           3.1-8   CRAN       3.2-3         CRAN  [2]       <NA>
sys                 <NA>   <NA>         3.4         CRAN <NA>       <NA>
testthat            <NA>   <NA>       3.0.1         CRAN <NA>       <NA>
tibble              <NA>   <NA>       3.0.4         CRAN <NA>       <NA>
tidyr               <NA>   <NA>       1.1.2         CRAN <NA>       <NA>
tidyselect          <NA>   <NA>       1.1.0         CRAN <NA>       <NA>
tidyverse           <NA>   <NA>       1.3.0         CRAN <NA>     direct
tinytex             <NA>   <NA>        0.28         CRAN <NA>       <NA>
utf8                <NA>   <NA>       1.1.4         CRAN <NA>       <NA>
utils               <NA>   <NA>        <NA>         <NA>  [2]   indirect
vctrs               <NA>   <NA>       0.3.6         CRAN <NA>       <NA>
viridis             <NA>   <NA>       0.5.1         CRAN <NA>       <NA>
viridisLite         <NA>   <NA>       0.3.0         CRAN <NA>       <NA>
 [ reached 'max' / getOption("max.print") -- omitted 7 rows ]

[1]: /home/rstudio/renv_testing/renv/library/R-3.6/x86_64-pc-linux-gnu
[2]: /tmp/Rtmp7FuOEF/renv-system-library                              

# User Profile =======================
[no user profile detected]

# Settings ===========================
List of 7
 $ external.libraries       : chr(0) 
 $ ignored.packages         : chr(0) 
 $ package.dependency.fields: chr [1:3] "Imports" "Depends" "LinkingTo"
 $ r.version                : chr(0) 
 $ snapshot.type            : chr "implicit"
 $ use.cache                : logi TRUE
 $ vcs.ignore.library       : logi TRUE

# Options ============================
List of 2
 $ renv.consent: logi TRUE
 $ renv.verbose: logi TRUE

# Environment Variables ==============
HOME                        = /home/rstudio
LANG                        = en_US.UTF-8
R_LIBS                      = /usr/local/lib/R/site-library:/usr/local/lib/R/library:/usr/lib/R/library
R_LIBS_SITE                 = 
R_LIBS_USER                 = /home/rstudio/renv_testing/renv/library/R-3.6/x86_64-pc-linux-gnu:/tmp/Rtmp7FuOEF/renv-system-library
RENV_DEFAULT_R_ENVIRON      = <NA>
RENV_DEFAULT_R_ENVIRON_USER = <NA>
RENV_DEFAULT_R_LIBS         = /usr/local/lib/R/site-library:/usr/local/lib/R/library:/usr/lib/R/library
RENV_DEFAULT_R_LIBS_SITE    = 
RENV_DEFAULT_R_LIBS_USER    = /usr/local/lib/R/site-library
RENV_DEFAULT_R_PROFILE      = <NA>
RENV_DEFAULT_R_PROFILE_USER = <NA>
RENV_PROJECT                = /home/rstudio/renv_testing

# PATH ===============================
- /usr/lib/rstudio-server/bin
- /usr/local/sbin
- /usr/local/bin
- /usr/sbin
- /usr/bin
- /sbin
- /bin

# Cache ==============================
There are a total of 0 package(s) installed in the renv cache.
Cache path: "~/.local/share/renv/cache/v5/R-3.6/x86_64-pc-linux-gnu"

原来是与 curl 包有关的错误。

由 Kevin Ushley 修复https://github.com/rstudio/renv/issues/603

非常感谢。