rinstallationr-library

Cannot load R package GLM3r on my macbook with Apple M1 chip


I am trying to install GLM3r in my mac Pro M1(12.6)

I use this code : devtools::install_github("GLEON/GLM3r", ref = "GLMv.3.1.0a3") and I got this error :

Downloading GitHub repo GLEON/GLM3r@GLMv.3.1.0a3 ── R CMD build ✔ checking for file ‘/private/var/folders/8p/db7_6hmd27b8x9mzg6qh_5k00000gn/T/Rtmp3as7Dn/remotes45c6c103ec1/GLEON-GLM3r-a3c1fa0/DESCRIPTION’ ... ─ preparing ‘GLM3r’: ✔ checking DESCRIPTION meta-information ... ─ checking for LF line-endings in source and make files and shell scripts ─ checking for empty or unneeded directories ─ building ‘GLM3r_3.1.2.tar.gz’

installing source package ‘GLM3r’ ... ** using staged installation ** R ** exec ** inst ** byte-compile and prepare package for lazy loading ** help *** installing help indices ** building package indices ** testing if installed package can be loaded from temporary location ** checking absolute paths in shared objects and dynamic libraries ERROR: some hard-coded temporary paths could not be fixed

removing ‘/Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/library/GLM3r’ Warning message: In i.p(...) : installation of package ‘/var/folders/8p/db7_6hmd27b8x9mzg6qh_5k00000gn/T//Rtmp3as7Dn/file45c1e882854/GLM3r_3.1.2.tar.gz’ had non-zero exit status

I would appreciate it if someone could help me to fix this problem. I don't have any clue how to solve this problem.


Solution

  • I could fix it by setting --no-staged-install parameter.

    devtools::install_github("GLEON/GLM3r", ref = "GLMv.3.1.0a3", INSTALL_opts="--no-staged-install")
    

    You can read more about it here: https://blog.r-project.org/2019/02/14/staged-install/index.html

    And, here is an example of a similar issue that is fixed by --no-staged-install parameter: hisafer installation - how do I solve hard-coded installation path?