pak
pak copied to clipboard
installation of development version fails on m1 macOS machines
It looks like the installer tries to pick a Linux MUSL build?
> install.packages("pak", repos = "https://r-lib.github.io/p/pak/dev/")
Installing package into '/opt/homebrew/lib/R/4.0/site-library'
(as 'lib' is unspecified)
trying URL 'https://r-lib.github.io/p/pak/dev/src/contrib/pak_0.1.2.9001_R4-0_x86_64-pc-linux-musl.tar.gz'
Content type 'application/gzip' length 9005947 bytes (8.6 MB)
==================================================
downloaded 8.6 MB
* installing *binary* package ‘pak’ ...
* DONE (pak)
The downloaded source packages are in
'/private/var/folders/qj/jvwzpj6n50917b3m53f9m2z40000gn/T/RtmpvU0AMY/downloaded_packages'
> pak::pak("tidyverse")
Warning: ! Wrong OS or architecture, pak is probably dysfunctional.
Call `pak_update()` to fix this.
Error in dyn.load(dll_file) :
unable to load shared object '/private/var/folders/qj/jvwzpj6n50917b3m53f9m2z40000gn/T/RtmpvU0AMY/file291c187a294e/ps/libs//ps.so':
dlopen(/private/var/folders/qj/jvwzpj6n50917b3m53f9m2z40000gn/T/RtmpvU0AMY/file291c187a294e/ps/libs//ps.so, 6): no suitable image found. Did find:
/private/var/folders/qj/jvwzpj6n50917b3m53f9m2z40000gn/T/RtmpvU0AMY/file291c187a294e/ps/libs//ps.so: unknown file type, first eight bytes: 0x7F 0x45 0x4C 0x46 0x02 0x01 0x01 0x00
/private/var/folders/qj/jvwzpj6n50917b3m53f9m2z40000gn/T/RtmpvU0AMY/file291c187a294e/ps/libs/ps.so: unknown file type, first eight bytes: 0x7F 0x45 0x4C 0x46 0x02 0x01 0x01 0x00
>
Yes, this method of installation does not support homebrew R currently. Which we should elaborate on the readme.
Unfortunately it is hard to solve this properly with just install.packages(), because it does not support architectures properly, and our repo serves (x86_64) Linux binaries when options(pkgType) is source.
But we should definitely add a paragraph to the README, to clarify which R builds and platforms are supported, and also improve pak_update() to help with this. Before the latter, we would ideally implement building a proper self-contained binary package just with install.packages() when the package type is source (and the platform is not x86_64 Linux), and then we can use that to support all the platforms we don't currently build binaries for.
The suggested installation method now fails on Homebrew R, and there is also a note in the README, under "Installation":
For macOS we only support the official CRAN R build. Other builds, e.g. Homebrew R, are not supported.
(https://pak.r-lib.org/#arrow_down-installation)
Installing from CRAN work on Homebrew R as well, but not the development version of pak. This is where we are now...