pak icon indicating copy to clipboard operation
pak copied to clipboard

Package installation with pak fails on cluster but works locally

Open Wang-Ande opened this issue 6 months ago • 1 comments

I’d like to ask why package installation fails on the cluster but works fine on my local machine. Recently, whenever I try to install any package with pak on the cluster, it always fails, while the same installation succeeds locally.

------------------------------Cluster---------------------------------

pak::pkg_install("YuLab-SMU/ivolcano")
! Failed to update system requirement mappings, will use cached mappings.  
Error: 
! error in pak subprocess
Caused by error: 
! Could not solve package dependencies:
* YuLab-SMU/ivolcano: Can't install dependency ggplot2
* ggplot2: Can't install dependency MASS
* MASS: Needs R >= 4.4.0
* MASS: Needs R >= 4.6
Type .Last.error to see the more details.

> pak::pkg_install("ggplot2")
! Failed to update system requirement mappings, will use cached mappings.  
Error: 
! error in pak subprocess
Caused by error: 
! Could not solve package dependencies:
* ggplot2: Can't install dependency MASS
* MASS: Needs R >= 4.4.0
* MASS: Needs R >= 4.6
Type .Last.error to see the more details.

> pak::pkg_install("MASS")
! Failed to update system requirement mappings, will use cached mappings.
Error: 
! error in pak subprocess
Caused by error: 
! Could not solve package dependencies:
* MASS: Needs R >= 4.4.0
* MASS: Needs R >= 4.6
Type .Last.error to see the more details.

---------------------------Local------------------------------------

> pak::pkg_install("YuLab-SMU/ivolcano")
! Using bundled GitHub PAT. Please add your own PAT using `gitcreds::gitcreds_set()`.
                                                                             
→ Will install 2 packages.
→ Will update 1 package.
→ Will download 2 CRAN packages (6.96 MB), cached: 1 (0 B).
+ ggiraph          0.9.0      [dl] (1.94 MB)
+ ggplot2  3.5.1 → 3.5.2      [dl] (5.02 MB)
+ ivolcano         0.0.0.9000 [bld][cmp] (GitHub: 838601f)

! ggplot2 is loaded in the current R session, you probably need to restart R after the installation.
? Do you want to continue (Y/n) Y
ℹ Getting 2 pkgs (6.96 MB), 1 cached
✔ Got ggiraph 0.9.0 (x86_64-w64-mingw32) (1.94 MB)                                            
✔ Got ggplot2 3.5.2 (i386+x86_64-w64-mingw32) (5.02 MB)                                      
✔ Got ivolcano 0.0.0.9000 (source) (1.40 MB)                             
✔ Downloaded 3 packages (8.36 MB) in 1m 54.3s                            
✔ Installed ggiraph 0.9.0  (531ms)                                            
✔ Installed ggplot2 3.5.2  (390ms)                                          
ℹ Packaging ivolcano 0.0.0.9000                                      
✔ Packaged ivolcano 0.0.0.9000 (27s)                                
ℹ Building ivolcano 0.0.0.9000                                      
✔ Built ivolcano 0.0.0.9000 (6.1s)                                  
✔ Installed ivolcano 0.0.0.9000 (github::YuLab-SMU/ivolcano@838601f) (148ms)
✔ 1 pkg + 59 deps: kept 31, upd 1, added 2, dld 3 (NA B) [3m 5.1s]  
`

Wang-Ande avatar Aug 29 '25 02:08 Wang-Ande

* MASS: Needs R >= 4.4.0
* MASS: Needs R >= 4.6

What R version is this? Is MASS already installed on your system?

gaborcsardi avatar Aug 30 '25 08:08 gaborcsardi