You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I'm using Ubuntu Noble, and I found pak fails to install when you have packages on /usr/local/lib/R/site-library.
Example:
For root:
sudo bash
R
pak::pkg_install("dplyr")
Now in a normal user:
R
pak::pkg_install("dplyr?source")
→ Will install 1 package.
→ The package (1.21 MB) is cached.
+ dplyr 1.1.4 [bld][cmp]
ℹ No downloads are needed, 1 pkg (1.21 MB) is cached
ℹ Building dplyr 1.1.4
✔ Built dplyr 1.1.4 (13s)
Error:
! error in pak subprocess
Caused by error in `verify_extracted_package(filename, pkg_cache)`:
! /tmp/RtmpNBsw5r/file5b8627a64e601/dplyr_1.1.4_R_x86_64-pc-linux-gnu.tar.gz is not a valid R package, it is an empty archive.
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 `verify_extracted_package(filename, pkg_cache)`:
! /tmp/RtmpNBsw5r/file5b8627a64e601/dplyr_1.1.4_R_x86_64-pc-linux-gnu.tar.gz is not a valid R package, it is an empty archive.
---
Backtrace:
1. pak::pkg_install("dplyr?source")
2. pak:::remote(function(...) get("pkg_install_do_plan", asNamespace("pak"))(...), …
3. 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:::verify_extracted_package(filename, pkg_cache)
13. base::throw(pkg_error("{.path {filename}} is not a valid R package, it is an empty archive.", …
14. | base::signalCondition(cond)
15. global (function (e) …
This is actually half of the problem, pak should check permissions, and if do not have them, should request to use a local directory.
The second half is if we have a new library pah, we can make a local one just trying to install dplyr normally:
install.packages("dplyr")
Installing package into ‘/usr/local/lib/R/site-library’
(as ‘lib’ is unspecified)
Warning in install.packages("dplyr") :
'lib = "/usr/local/lib/R/site-library"' is not writable
Would you like to use a personal library instead? (yes/No/cancel) yes
Would you like to create a personal library
‘/home/cit_16/R/x86_64-pc-linux-gnu-library/4.4’
to install packages into? (yes/No/cancel) yes
## CANCEL NOW
Now that the local folder exists, we can see the second issue, is that in case we have multiple paths on libPath, pak will ignore all of the others, install a package in root means will store on /usr/local/lib/R/site-library which also has other packages, but if we try to install again:
Hi, I'm using Ubuntu Noble, and I found pak fails to install when you have packages on
/usr/local/lib/R/site-library
.Example:
For root:
Now in a normal user:
This is actually half of the problem, pak should check permissions, and if do not have them, should request to use a local directory.
The second half is if we have a new library pah, we can make a local one just trying to install dplyr normally:
Now that the local folder exists, we can see the second issue, is that in case we have multiple paths on libPath, pak will ignore all of the others, install a package in root means will store on
/usr/local/lib/R/site-library
which also has other packages, but if we try to install again:Pak will reinstall everything, even the packages that are already provided from a parent libPath, is ignoring all the installed libraries.
Tested on git Pak.
Thx!
The text was updated successfully, but these errors were encountered: