Closed pachadotdev closed 1 year ago
The current release of devtools is 2.4.5, so the first thing to do is to update devtools and check if you can reproduce the problem.
I don't quite follow the above, as it appears you select "3" corresponding to "None". And then I see "Installling 21 packages..." Is that the problem?
thanks, I am trying to render the book in a 100% new environment, so it installs 21 packages but then fails, unless I install gridExtra, terra, modeldata, palmerpenguins, etc one by one
btw, Ubuntu has devtools 2.4.3, otherwise I need to compile from sources
Even if there is a bug in devtools 2.4.3, I can't fix it, because I can't go back in time. So the only finding that I could potentially act on is if this can be reproduced with the current version of devtools.
I also suspect that if we establish a problem, it's going to be in the remotes package not devtools, because that's where this menu is actually coming from:
https://github.com/r-lib/remotes/blob/1e12140952d239ccbfc58df1a116ae3a50792d7e/R/deps.R#L660
cc @gaborcsardi
What is traceback()
right after the error?
binvers
is not a variable we ever use in devtools or remotes, so I suspect, that the error is not coming from us. The traceback will probably tell you where it is coming from.
Another thing you could try is using pak to install packages instead of devtools or remotes, it does a much better job: https://pak.r-lib.org.
Yeah the error is originating from base R, although remotes is presumably an intermediary:
But @pachadotdev, chances are, whatever infelicity you're seeing in an outdated version of devtools or in remotes (which is in maintenance mode) ... the answer is almost certainly to use the current versions of all packages and to favor pak for getting your dependencies installed.
@jennybc @gaborcsardi
I confirm it happens with devtools 2.4.3 but not 2.4.5. I did this to provide a full log that is 100% traceable.
sudo apt install docker.io
sudo systemctl start docker
sudo usermod -aG docker $USER
newgrp docker
docker --version
docker run hello-world
docker pull ubuntu
docker run -it ubuntu bash
I installed R in the VM by adapting these instructions (i.e., I'm not using sudo
because docker logged me as root, and also docker does not provide the sudo
command).
I also install r-base-dev
, otherwise devtools
installation will fail because r-base
does not install make
in the docker VM. libxml2-dev
, libssl-dev
and the other lib*
are also required for devtools
.
apt update && apt upgrade
apt install software-properties-common dirmngr wget git libxml2-dev libssl-dev libcurl4-openssl-dev libfontconfig1-dev libharfbuzz-dev libfribidi-dev libfreetype6-dev libpng-dev libtiff5-dev libjpeg-dev
wget -qO- https://cloud.r-project.org/bin/linux/ubuntu/marutter_pubkey.asc | tee -a /etc/apt/trusted.gpg.d/cran_ubuntu_key.asc
add-apt-repository "deb https://cloud.r-project.org/bin/linux/ubuntu $(lsb_release -cs)-cran40/"
apt install r-base-dev
cd ~
git clone --depth 1 https://github.com/cienciadedatos/r4ds
cd r4ds
R
R version 4.3.0 (2023-04-21) -- "Already Tomorrow"
...
install.packages("devtools")
...
library(devtools)
library(remotes)
session_info()
- Session info -------------------------------------------------------------------------------------------------------------
setting value
version R version 4.3.0 (2023-04-21)
os Ubuntu 22.04.2 LTS
system x86_64, linux-gnu
ui X11
language (EN)
collate C
ctype C
tz America/Toronto
date 2023-05-20
pandoc NA
- Packages -----------------------------------------------------------------------------------------------------------------
package * version date (UTC) lib source
cachem 1.0.8 2023-05-01 [1] CRAN (R 4.3.0)
callr 3.7.3 2022-11-02 [1] CRAN (R 4.3.0)
cli 3.6.1 2023-03-23 [1] CRAN (R 4.3.0)
crayon 1.5.2 2022-09-29 [1] CRAN (R 4.3.0)
devtools * 2.4.5 2022-10-11 [1] CRAN (R 4.3.0)
digest 0.6.31 2022-12-11 [1] CRAN (R 4.3.0)
ellipsis 0.3.2 2021-04-29 [1] CRAN (R 4.3.0)
fastmap 1.1.1 2023-02-24 [1] CRAN (R 4.3.0)
fs 1.6.2 2023-04-25 [1] CRAN (R 4.3.0)
glue 1.6.2 2022-02-24 [1] CRAN (R 4.3.0)
htmltools 0.5.5 2023-03-23 [1] CRAN (R 4.3.0)
htmlwidgets 1.6.2 2023-03-17 [1] CRAN (R 4.3.0)
httpuv 1.6.11 2023-05-11 [1] CRAN (R 4.3.0)
later 1.3.1 2023-05-02 [1] CRAN (R 4.3.0)
lifecycle 1.0.3 2022-10-07 [1] CRAN (R 4.3.0)
magrittr 2.0.3 2022-03-30 [1] CRAN (R 4.3.0)
memoise 2.0.1 2021-11-26 [1] CRAN (R 4.3.0)
mime 0.12 2021-09-28 [1] CRAN (R 4.3.0)
miniUI 0.1.1.1 2018-05-18 [1] CRAN (R 4.3.0)
pkgbuild 1.4.0 2022-11-27 [1] CRAN (R 4.3.0)
pkgload 1.3.2 2022-11-16 [1] CRAN (R 4.3.0)
prettyunits 1.1.1 2020-01-24 [1] CRAN (R 4.3.0)
processx 3.8.1 2023-04-18 [1] CRAN (R 4.3.0)
profvis 0.3.8 2023-05-02 [1] CRAN (R 4.3.0)
promises 1.2.0.1 2021-02-11 [1] CRAN (R 4.3.0)
ps 1.7.5 2023-04-18 [1] CRAN (R 4.3.0)
purrr 1.0.1 2023-01-10 [1] CRAN (R 4.3.0)
R6 2.5.1 2021-08-19 [1] CRAN (R 4.3.0)
Rcpp 1.0.10 2023-01-22 [1] CRAN (R 4.3.0)
remotes * 2.4.2 2021-11-30 [1] CRAN (R 4.3.0)
rlang 1.1.1 2023-04-28 [1] CRAN (R 4.3.0)
sessioninfo 1.2.2 2021-12-06 [1] CRAN (R 4.3.0)
shiny 1.7.4 2022-12-15 [1] CRAN (R 4.3.0)
stringi 1.7.12 2023-01-11 [1] CRAN (R 4.3.0)
stringr 1.5.0 2022-12-02 [1] CRAN (R 4.3.0)
urlchecker 1.0.1 2021-11-30 [1] CRAN (R 4.3.0)
usethis * 2.1.6 2022-05-25 [1] CRAN (R 4.3.0)
vctrs 0.6.2 2023-04-19 [1] CRAN (R 4.3.0)
xtable 1.8-4 2019-04-21 [1] CRAN (R 4.3.0)
[1] /usr/local/lib/R/site-library
[2] /usr/lib/R/site-library
[3] /usr/lib/R/library
----------------------------------------------------------------------------------------------------------------------------
install()
The problem does not appear, but then terra
fails and I had to run apt install libgdal-dev
, which worked.
also @jennybc @gaborcsardi, I created this repo to configure Ubuntu to install binary packages and also to install RStudio with apt install rstudio
(stable and daily) https://github.com/pachadotdev/r-packages-ubuntu
Ok glad to hear that using current versions works!
With devtools (
devtools * 2.4.3 2021-11-30 [3] CRAN (R 4.2.0)
) we see this when there is more than one package to install when, for example, we want to install the r4ds package from github.com/cienciadedatos/r4dsif we install N-1 or N missing dependencies,
devtools::install()
works