Reputation: 23
I'm having problems at installing the package ape from CRAN on macOS by using the following code line: install.packages("ape").
I get the following outputs:
ld: warning: directory not found for option ' L/usr/local/lib/gcc/x86_64-apple-darwin13.0.0/4.8.2' ld: library not found for -lgfortran clang: error: linker command failed with exit code 1 (use -v to see invocation)
I've tried to troubleshoot the problem by installing Xcode using the following code in the terminal: xcode-select--install. It didn't help tough.
Upvotes: 0
Views: 771
Reputation: 46886
An easy solution is to install the binary version if available; generally for new users this is the best strategy. I guess you have
> getOption("pkgType")
[1] "source"
and you would like to instead use
options(pkgType = "mac.binary.el-capitan")
See ?options
for some more detail; see ?.Rprofile
for setting this option on startup.
Upvotes: 5