Problem installing lme4

Hello,

I was happily installing packages for artMS when this error popped up:

  • installing source package ‘lme4’ ...
    ** package ‘lme4’ successfully unpacked and MD5 sums checked
    ** libs
    xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
    ERROR: compilation failed for package ‘lme4’
  • removing ‘/Library/Frameworks/R.framework/Versions/3.5/Resources/library/lme4’
    Error in i.p(...) :
    (converted from warning) installation of package ‘lme4’ had non-zero exit status

Please bear with me, I know only enough to get by when it comes to R and programming language.
I'm running on macOS Mojave 10.14.3, R v.3.5.2, RStudio v.1.1.463
When updating R, I did also install clang-6.0.0 and gfortran-6.1
There was a message to create(I think) a bin location(? - I've been struggling to understand the bin thing) using this command:

export PATH=/usr/local/clang6/bin:$PATH

I'm not sure I executed this correctly or if this has anything to do with the error I'm getting above. All other packages in the install seemed to load fine.

Thanks so much for any help!!

Never install from source on a Mac if you can avoid it. Try this instead

if (!requireNamespace("BiocManager", quietly = TRUE))
    install.packages("BiocManager")
BiocManager::install("artMS", version = "3.8")

Will do. Thank you!

Out of curiosity, is there a reason why it's bad to install from source on a Mac?

Good question. It's not bad, per se, it's just that there's usually no reason not to await a week on CRAN for a OS binary and although some install from source, many others assume libraries or compiler versions that are non-standard on OS. That's likely lead to a dreaded "Exit 1" status and failure to install.

It is sometimes possible, to replace the offending OS toolchains, but that may only work until Redwoods or whatever the next OS version is, along with its new XCODE. On a few occasions, I've been able to go into makefiles and throw a switch and get it to compile, but that's usually not how I want to spend the day!

1 Like

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.