Closed jamesboot closed 7 months ago
Hi @jamesboot,
Thank you for your interest in CARD!
It seems like the problem arises due to an architecture mismatch. The system you're using is arm64 (likely a newer Mac with the M1 chip), but the libraries that R is trying to link against were built for the x86_64 architecture (Intel Macs).
Here are a couple of things that you may try to fix this:
1. Update R and R packages:
Before proceeding, make sure you have the latest version of R installed on your macOS system. Additionally, update all the packages listed in the error message to their most recent versions. To do this, enter the numbers corresponding to the packages that need updates when prompted (e.g., enter '1' to update all packages).
2. Configure R to use x86_64 architecture:
If updating R and packages doesn't work, you can try running R in Rosetta2 mode, which allows it to use the x86_64 architecture on an arm64 macOS system. To do this, find R in Finder, Get Info on the app (right-click > Get Info), and check the box for "Open using Rosetta".
Hope this can help!
Best, Ying
Thanks Ying,
I have tried running R using Rosetta. It has helped to come extent, I have managed to install all of the dependencies and update the required packages. However when I try to install CARD I am still getting the above message even though I am running the x86_64 architecture.
Cheers James
Hi @jamesboot,
Sorry for the late reply.
Do you have Xcode and Xcode Command Lines tools installed? This provides necessary tools for compiling some R packages. If not, try to install it by typing the script in terminal:
xcode-select --install
Also, could you please check if you have "sf" package installed by
library(sf)
You might also try forcing the installation of the package from source.
devtools::install_github('YingMa0107/CARD', type="source")
Best, Ying
No luck I'm afraid. I installed on our institutes linux based HPC instead, that is working.
Hi @jamesboot,
I also have a M1 Mac Monterey, and was able to resolve this issue by reinstalling R with the binary for Apple Silicon, downloading the binary for gfortran
by using the command brew install gcc
and then installing OpenMP manually based on my Apple Clang version. The first answer for this post helped me a lot as well!
Best,
Mason
Hi,
Thanks for a great package. I am receiving the following error when installing:
I read previous threads regarding the gcc compiler not being installed but I have installed it, seems to be working. Any suggestions would be great!