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

callr error on install #155

Closed
akgold opened this issue Oct 7, 2019 · 4 comments
Closed

callr error on install #155

akgold opened this issue Oct 7, 2019 · 4 comments

Comments

@akgold
Copy link

akgold commented Oct 7, 2019

Installing using pak inside a docker container fails with error Error: callr subprocess failed: Failed to download abind from 'https://demo.rstudiopm.com/cran/__linux__/bionic/latest/src/contrib/abind_1.4-5.tar.gz'. The link is valid for the correct tarball.

Installing using utils::install.packages works fine.

Dockerfile below reproduces.

# Setup --------
FROM ubuntu:bionic

ARG R_VERSION=3.6.1
ARG R_REPO='https://demo.rstudiopm.com/cran/__linux__/bionic/latest'

# Install R -------------------------------------------------------------------#

RUN apt-get update -y && \
    DEBIAN_FRONTEND=noninteractive apt-get install -y \
    curl \
    gdebi

RUN curl -O https://cdn.rstudio.com/r/ubuntu-1804/pkgs/r-${R_VERSION}_1_amd64.deb && \
    DEBIAN_FRONTEND=noninteractive gdebi --non-interactive r-${R_VERSION}_1_amd64.deb

RUN ln -s /opt/R/${R_VERSION}/bin/R /usr/local/bin/R && \
    ln -s /opt/R/${R_VERSION}/bin/Rscript /usr/local/bin/Rscript

RUN echo "options(\"repos\" = c(RSPM = \"${R_REPO}\"), \"HTTPUserAgent\" = \"R/${R_VERSION} R (${R_VERSION} x86_64-pc-linux-gnu x86_64-pc-linux-gnu x86_64-pc-linux-gnu)\");" >> \
	/opt/R/${R_VERSION}/lib/R/etc/Rprofile.site

# works
RUN /opt/R/${R_VERSION}/bin/R -e "utils::install.packages('pak')"
# fails
RUN /opt/R/${R_VERSION}/bin/R -e "pak::pkg_install('abind')"
# works
RUN /opt/R/${R_VERSION}/bin/R -e "utils::install.packages('abind')"
@nviraj
Copy link

nviraj commented Aug 10, 2020

Not sure if this helps but faced a similar issue.

System Info

Sys.info()
sysname release version
"Linux" "4.19.104-microsoft-standard" "#1 SMP Wed Feb 19 06:37:35 UTC 2020"
nodename machine login
"9fb82202b4d1" "x86_64" "unknown"
user effective_user
"rstudio" "rstudio"

Session Info

sessionInfo()
R version 4.0.2 (2020-06-22)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 20.04 LTS

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

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

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

other attached packages:
[1] dplyr_1.0.1 pak_0.1.2 pacman_0.5.1 renv_0.11.0

pak::pkg_install(pkg = "tidyverse", ask = F, lib = .libPaths()[[1]])

                                              cli message status_cleare

→ Will install 55 packages:
askpass, BH, blob, broom, cellranger, clipr, colorspace, cpp11, DBI, dbplyr, evaluate, farver, forcats, fs,
ggplot2, gtable, haven, highr, htmltools, httr, isoband, knitr, labeling, lattice, lubridate, markdown, MASS,
Matrix, mgcv, mime, modelr, munsell, openssl, pkgload, praise, RColorBrewer, Rcpp, readr, readxl, rematch, reprex,
rmarkdown, rstudioapi, rvest, scales, sys, testthat, tidyr, tidyverse, tinytex, viridisLite, whisker, xfun, yaml,
nlme

→ Will not update 38 packages.

→ Will download 55 CRAN packages (47.15 MB).

Error: callr subprocess failed: Failed to download askpass from https://cran.rstudio.com/src/contrib/askpass_1.1.tar.gz and https://cran.rstudio.com/src/contrib/Archive/askpass_1.1.tar.gz.
Failed to download BH from https://cran.rstudio.com/src/contrib/BH_1.72.0-3.tar.gz and https://cran.rstudio.com/src/contrib/Archive/BH_1.72.0-3.tar.gz.
Failed to download blob from https://cran.rstudio.com/src/contrib/blob_1.2.1.tar.gz and https://cran.rstudio.com/src/contrib/Archive/blob_1.2.1.tar.gz.
Failed to download broom from https://cran.rstudio.com/src/contrib/broom_0.7.0.tar.gz and https://cran.rstudio.com/src/contrib/Archive/broom_0.7.0.tar.gz.
Failed to download cellranger from https://cran.rstudio.com/src/contrib/cellranger_1.1.0.tar.gz and https://cran.rstudio.com/src/contrib/Archive/cellranger_1.1.0.tar.gz.
Failed to download clipr from https://cran.rstudio.com/src/contrib/clipr_0.7.0.tar.gz and https://cran.rstudio.com/src/contrib/Archive/clipr_0.7.0.tar.gz.

@jimhester
Copy link
Member

Changing your docker file to use utils::install.packages('pak', repos = 'https://r-lib.github.io/p/pak/dev/') makes the installation work, so I believe this can be closed.

@alexpghayes
Copy link

Just came across this for local installs on Ubuntu. To be clear, this is a hack to install the dev version of pak from install.packages()? And using the dev version is the fix?

@gaborcsardi
Copy link
Member

It is not a hack, it is the supported way: https://github.com/r-lib/pak#installation

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

5 participants