Error while installing R package: package built for universal-apple-darwin

Go To StackoverFlow.com

2

I installed a R package as suggested by How do I install an R package from source?, using R CMD INSTALL [my_pkg_path.tgz]. Package sources are downloaded from r-project.org, e.g., http://cran.r-project.org/web/packages/fields/index.html

However, when I try to load the package using say library(fields), I got the error that complains the package are built for universal-apple-darwin:

Error: package ‘fields’ was built for universal-apple-darwin9.8.0

Guess it's something to do with architecture, but no idea how to resolve it. Any idea? Thanks.

2012-04-04 03:16
by clwen
You have the wrong binary, download the one for your OS. Assumingly Windows? Or use install.packages("fields",type="source" - Hansi 2012-04-04 08:48
I'm using MAC OS X. Using install.packages resulting the same error. I think it's the source file that matters - clwen 2012-04-04 12:01


2

It looks like you downloaded the package's Mac OSX binary file, which usually ends in .tgz - try downloading the package source (usually something ending in .tar.gz) and installing the package again.

Depending on what your operating system is, you may need an additional set of software before you can install packages from source. If the above suggestion doesn't work, would you provide some information about the OS, for example from sessionInfo()?

2012-04-04 05:35
by BenBarnes
Thanks! .tgz worked. I thought .tgz and .tar.gz is the same thing - clwen 2012-04-04 12:01
Ads