Compile R on Mac OS X

I did this before on my Macbook, but never documented. Wanted to document my attempt on the Mac virtual machine.

  1. Install Xcode (gcc/g++) and gfortran per this site.
  2. Download the R source file (2.12 in this example), and extract it.
  3. ./configure did not work (Fortran issue). Per this, this, and this, I used: ./configure --with-blas‘-framework vecLib’ –with-lapack –with-aqua –enable-R-framework F77=”gfortran -arch x86_64″= (the F77 is needed!).
  4. make then sudo make install.
  5. Add /Library/Frameworks/R.framework/Versions/Current/Resources/bin to PATH in ~/.bashrc.

About Vinh Nguyen

Statistician

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>