Issue with glmulti package causing fatal error on mac m3 pro

hi everyone,
i'm experiencing a fatal error in RStudio when trying to load the glmulti package on my mcbook m3 pro as soon as i run < **(*select.modele.aic <- glmulti(Sales ~., data = Carseats, level = 1, ***

*** fitfunction = lm, crit = "aic", plotty = FALSE, method = "h")*** > RStudio crashes and shows fatal error message. i have downloaded leaps package, java app, rjava package.

1 Like

The crash might be due to glmulti's dependency on rJava, which can have compatibility issues on macOS. Try these steps:

  1. Ensure Java is properly installed and recognized by R:
    Sys.setenv(JAVA_HOME = "/Library/Java/JavaVirtualMachines/<your-java-version>/Contents/Home")  
    library(rJava)  
    
  2. Reinstall glmulti and rJava:
    install.packages("glmulti", dependencies = TRUE)  
    install.packages("rJava")  
    
  3. If the issue persists, try running RStudio with Rosetta 2 (right-click the app → Get Info → check "Open using Rosetta").
  4. If still crashing, consider using an alternative like MuMIn for model selection.