r-lib / pak

A fresh approach to package installation
https://pak.r-lib.org
671 stars 60 forks source link

Error when trying to install spacific packages: "is not a valid R package, it is an empty archive" #658

Open apcamargo opened 3 months ago

apcamargo commented 3 months ago

When trying to install some specific packages (geosphere, and fullRankMatrix), I get the following error:

> pak::pkg_install("fullRankMatrix")

→ Will install 1 package.
→ Will download 1 package with unknown size.
+ fullRankMatrix   0.1.0 [dl]

ℹ Getting 1 pkg with unknown size
✔ Cached copy of fullRankMatrix 0.1.0 (x86_64-pc-linux-gnu-ubuntu-22.04) is the latest build
✔ No downloads needed, all packages are cached                               
Error:                                                                  
! error in pak subprocess
Caused by error in `verify_extracted_package(filename, pkg_cache)`:
! 
/tmp/RtmpayG4sq/file1ab472c47dc/src/contrib/x86_64-pc-linux-gnu-ubuntu-22.04/4.4/fullRankMatrix_0.1.0.tar.gz
is not a valid R package, it is an empty archive.
Type .Last.error to see the more details.

install.packages works normally. This was previously described in a closed issue (https://github.com/r-lib/pak/issues/518). Just as the author of that issue, I don't have storage limitations.

I'm running R from a container that was create from the following Dockerfile:

FROM rocker/tidyverse:latest

RUN apt-get update \
    && apt-get install -y --no-install-recommends \
    libglpk-dev libxt-dev cmake build-essential libcurl4-openssl-dev libnode-dev libnlopt-dev

RUN R -q -e 'install.packages("pak")'
RUN R -q -e 'pak::pkg_install(c("brunnermunzel", "ggforce", "patchwork", "gt", "khroma", "Biostrings", "viridis", "gtools", "dunn.test", "fs", "ggokabeito", "ggtree", "ggtreeExtra", "ggnewscale", "Peptides", "lmerTest", "gluedown", "TreeDist", "Quartet", "cowplot", "ape", "phytools", "ggblend", "ggseqlogo", "bio3d", "colorspace", "plotwidgets", "PCAtools", "cluster", "dbscan", "sf", "rnaturalearth", "rnaturalearthdata", "styler"))'