natverse / neuprintr

R client utilities for interacting with the neuPrint connectome analysis service
http://natverse.org/neuprintr
3 stars 3 forks source link

Error in install: error in pak subprocess #177

Closed mmc46 closed 1 month ago

mmc46 commented 1 month ago
natmanager::install(pkgs = "natverse/neuprintr")
✔ Updated metadata database: 5.60 MB in 10 files.                          
✔ Updating metadata database ... done                                      

→ Will update 1 package.
→ Will download 1 package with unknown size.
+ neuprintr 1.3.2.9000 → 1.3.2.9000 👷🔧 ⬇ (GitHub: a6b57e6)
? Do you want to continue (Y/n) y
ℹ Getting 1 pkg with unknown size
✔ Got neuprintr 1.3.2.9000 (source) (4.00 MB)                
✔ Downloaded 1 package (4.00 MB) in 1.8s                     
ℹ Packaging neuprintr 1.3.2.9000
✔ Packaged neuprintr 1.3.2.9000 (5.8s)                               
ℹ Building neuprintr 1.3.2.9000                                      
✔ Built neuprintr 1.3.2.9000 (6.5s)                                  
Error:                                                                 
! error in pak subprocess
Caused by error in `filelock::lock(lockfile)`:
! Cannot open lock file: Permission denied
Type .Last.error to see the more details.
> .Last.error
<callr_error/rlib_error_3_0/rlib_error/error>
Error: 
! error in pak subprocess
Caused by error in `filelock::lock(lockfile)`:
! Cannot open lock file: Permission denied
---
Backtrace:
1. natmanager::install(pkgs = "natverse/neuprintr")
2. pak::pkg_install(repos, upgrade = upgrade.dependencies, dependencies = dependenc…
3. pak:::remote(function(...) get("pkg_install_do_plan", asNamespace("pak"))(...), …
4. err$throw(res$error)
---
Subprocess backtrace:
 1. base::withCallingHandlers(cli_message = function(msg) { …
 2. get("pkg_install_do_plan", asNamespace("pak"))(...)
 3. proposal$install()
 4. pkgdepends::install_package_plan(plan, lib = private$library, num_workers = nw, …
 5. base::withCallingHandlers({ …
 6. pkgdepends:::handle_events(state, events)
 7. pkgdepends:::handle_event(state, i)
 8. proc$get_result()
 9. processx:::process_get_result(self, private)
10. private$post_process()
11. pkgdepends:::install_extracted_binary(filename, lib_cache, pkg_cache, lib, …
12. pkgdepends:::lock_cache(lib_cache, pkg_name, getOption("install.lock"))
13. filelock::lock(lockfile)
14. base::.handleSimpleError(function (e) …
15. global h(simpleError(msg, call))
mmc46 commented 1 month ago

Fixed by

natmanager::install(pkgs = "natverse/neuprintr", method = "remotes")
jefferis commented 1 month ago

Thanks for the report. I have yet to figure out if there is any particular logic to when this issue comes up, but experience since switching from remotes to pak suggests that pak is faster when it works but a little flakier.