pak install error with Unable to move package from cache to pkgdir

Open
#829 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
r
Domain
tooling

Research direction

Start by reproducing the failure with pak::pak("tidyplots") and inspect the install_extracted_binary path named in the error. Investigate why the cached fastmap package cannot move into the package directory, then verify that installation succeeds without manually removing the existing package; the separate redundant reinstall concern also needs a defined expected behavior.

Written by the indexing model from the issue text.

Description

There seems to be an issue each time moving a complied or cached package from tmp dir to package dir. Each time, I need to manually remove package from the package dir in order for pak::pak to run successfully. I checked my directory ACLS and they seem all good.

pak::pak("tidyplots")
✔ Loading metadata database ... done
 
→ Will install 1 package.
→ Will update 6 packages.
→ All 7 packages (0 B) are cached.
+ cachem            1.1.0 
+ fastmap   1.2.0 → 1.2.0 
+ magrittr  2.0.4 → 2.0.4 
+ ragg      1.5.0 → 1.5.0 
+ Rcpp      1.1.0 → 1.1.0 
+ S7        0.2.0 → 0.2.0 
+ tidyplots 0.3.1 → 0.3.1 [bld]
ℹ No downloads are needed, 7 pkgs are cached
Error: 
! error in pak subprocess
Caused by error in `install_extracted_binary(filename, lib_cache, pkg_cache, lib, …`:
! Unable to move package from .../renv/pkgs/4.2/_cache/file60b692abe6fd/fastmap
to ...renv/pkgs/4.2/fastmap

Also, a minor issue when installing or updating a package with pak::pak("pkgname"), often times pak command either reinstalls or rebuilds a package with an identical version. I cannot find if there is an option to skip this step while keeping an option enabled when reinstall/rebuild is required with version change for dependencies.

Thanks!

Dominant language
C
Stars
821
Forks
88
Avg merge
17m
Merged PRs (30d)
1

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from r-lib/pak

All issues in r-lib/pak

Similar issues

More C issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.