title: R-Studio & R Continuously Fail To Install Packages
body: <p>I'm trying to learn how to use R in Finance, and I'm trying to install a package but keep getting the following errors. I've tried now with R 3.0.3 through every version to the current and still the same error. Somebody has confirmed for me that the install worked for them on 3.1.0 so I was hoping somebody here may have some input as to what to try next, as I'm really out of ideas and search queries at this point.</p>
  
  <pre><code>&gt; install.packages("quantstrat", repos="http://R-Forge.R-project.org")
  Warning in install.packages :
    cannot open: HTTP status was '404 Not Found'
  Warning in install.packages :
    cannot open: HTTP status was '404 Not Found'
  Warning in install.packages :
    unable to access index for repository http://R-Forge.R-project.org/bin/macosx/contrib/3.1
  
     package ‘quantstrat’ is available as a source package but not as a binary
  
  Warning in install.packages :
    package ‘quantstrat’ is not available (for R version 3.1.0)
  </code></pre>
  
  <p>Edit: Following the suggestion in the below comments I have tried entering:</p>
  
  <pre><code>install.packages("quantstrat", repos="http://R-Forge.R-project.org", type="source")
  </code></pre>
  
  <p>Which yields only this cryptic message after downloading a handful of files:</p>
  
  <pre><code>* installing *source* package ‘zoo’ ...
  ** libs
  clang -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG  -I/usr/local/include    -fPIC  -mtune=core2 -g -O2  -c coredata.c -o coredata.o
  clang -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG  -I/usr/local/include    -fPIC  -mtune=core2 -g -O2  -c init.c -o init.o
  clang -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG  -I/usr/local/include    -fPIC  -mtune=core2 -g -O2  -c lag.c -o lag.o
  clang -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -single_module -multiply_defined suppress -L/usr/local/lib -L/usr/local/lib -o zoo.so coredata.o init.o lag.o -F/Library/Frameworks/R.framework/.. -framework R -Wl,-framework -Wl,CoreFoundation
  installing to /Library/Frameworks/R.framework/Versions/3.1/Resources/library/zoo/libs
  ** R
  ** demo
  ** inst
  ** preparing package for lazy loading
  ** help
  *** installing help indices
  ** building package indices
  ** installing vignettes
  ** testing if installed package can be loaded
  * DONE (zoo)
  * installing *source* package ‘xts’ ...
  ** libs
  clang -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG  -I/usr/local/include -I"/Library/Frameworks/R.framework/Versions/3.1/Resources/library/zoo/include"   -fPIC  -mtune=core2 -g -O2  -c add_class.c -o add_class.o
  clang -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG  -I/usr/local/include -I"/Library/Frameworks/R.framework/Versions/3.1/Resources/library/zoo/include"   -fPIC  -mtune=core2 -g -O2  -c any.c -o any.o
  clang -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG  -I/usr/local/include -I"/Library/Frameworks/R.framework/Versions/3.1/Resources/library/zoo/include"   -fPIC  -mtune=core2 -g -O2  -c attr.c -o attr.o
  clang -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG  -I/usr/local/include -I"/Library/Frameworks/R.framework/Versions/3.1/Resources/library/zoo/include"   -fPIC  -mtune=core2 -g -O2  -c binsearch.c -o binsearch.o
  clang -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG  -I/usr/local/include -I"/Library/Frameworks/R.framework/Versions/3.1/Resources/library/zoo/include"   -fPIC  -mtune=core2 -g -O2  -c coredata.c -o coredata.o
  clang -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG  -I/usr/local/include -I"/Library/Frameworks/R.framework/Versions/3.1/Resources/library/zoo/include"   -fPIC  -mtune=core2 -g -O2  -c diff.c -o diff.o
  clang -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG  -I/usr/local/include -I"/Library/Frameworks/R.framework/Versions/3.1/Resources/library/zoo/include"   -fPIC  -mtune=core2 -g -O2  -c dimnames.c -o dimnames.o
  clang -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG  -I/usr/local/include -I"/Library/Frameworks/R.framework/Versions/3.1/Resources/library/zoo/include"   -fPIC  -mtune=core2 -g -O2  -c endpoints.c -o endpoints.o
  clang -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG  -I/usr/local/include -I"/Library/Frameworks/R.framework/Versions/3.1/Resources/library/zoo/include"   -fPIC  -mtune=core2 -g -O2  -c extract_col.c -o extract_col.o
  clang -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG  -I/usr/local/include -I"/Library/Frameworks/R.framework/Versions/3.1/Resources/library/zoo/include"   -fPIC  -mtune=core2 -g -O2  -c init.c -o init.o
  clang -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG  -I/usr/local/include -I"/Library/Frameworks/R.framework/Versions/3.1/Resources/library/zoo/include"   -fPIC  -mtune=core2 -g -O2  -c isOrdered.c -o isOrdered.o
  clang -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG  -I/usr/local/include -I"/Library/Frameworks/R.framework/Versions/3.1/Resources/library/zoo/include"   -fPIC  -mtune=core2 -g -O2  -c isXts.c -o isXts.o
  clang -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG  -I/usr/local/include -I"/Library/Frameworks/R.framework/Versions/3.1/Resources/library/zoo/include"   -fPIC  -mtune=core2 -g -O2  -c leadingNA.c -o leadingNA.o
  clang -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG  -I/usr/local/include -I"/Library/Frameworks/R.framework/Versions/3.1/Resources/library/zoo/include"   -fPIC  -mtune=core2 -g -O2  -c merge.c -o merge.o
  gfortran-4.2 -arch x86_64   -fPIC  -g -O2  -c period.max.f -o period.max.o
  make: gfortran-4.2: No such file or directory
  make: *** [period.max.o] Error 1
  ERROR: compilation failed for package ‘xts’
  * removing ‘/Library/Frameworks/R.framework/Versions/3.1/Resources/library/xts’
  Warning in install.packages :
    installation of package ‘xts’ had non-zero exit status
  ERROR: dependency ‘xts’ is not available for package ‘PerformanceAnalytics’
  * removing ‘/Library/Frameworks/R.framework/Versions/3.1/Resources/library/PerformanceAnalytics’
  Warning in install.packages :
    installation of package ‘PerformanceAnalytics’ had non-zero exit status
  ERROR: dependency ‘xts’ is not available for package ‘TTR’
  * removing ‘/Library/Frameworks/R.framework/Versions/3.1/Resources/library/TTR’
  Warning in install.packages :
    installation of package ‘TTR’ had non-zero exit status
  ERROR: dependencies ‘Defaults’, ‘xts’, ‘TTR’ are not available for package ‘quantmod’
  * removing ‘/Library/Frameworks/R.framework/Versions/3.1/Resources/library/quantmod’
  Warning in install.packages :
    installation of package ‘quantmod’ had non-zero exit status
  ERROR: dependencies ‘quantmod’, ‘xts’ are not available for package ‘FinancialInstrument’
  * removing ‘/Library/Frameworks/R.framework/Versions/3.1/Resources/library/FinancialInstrument’
  Warning in install.packages :
    installation of package ‘FinancialInstrument’ had non-zero exit status
  ERROR: dependencies ‘xts’, ‘FinancialInstrument’, ‘PerformanceAnalytics’, ‘quantmod’ are not available for package ‘blotter’
  * removing ‘/Library/Frameworks/R.framework/Versions/3.1/Resources/library/blotter’
  Warning in install.packages :
    installation of package ‘blotter’ had non-zero exit status
  ERROR: dependencies ‘xts’, ‘TTR’, ‘blotter’, ‘FinancialInstrument’ are not available for package ‘quantstrat’
  * removing ‘/Library/Frameworks/R.framework/Versions/3.1/Resources/library/quantstrat’
  Warning in install.packages :
    installation of package ‘quantstrat’ had non-zero exit status
  
  The downloaded source packages are in
      ‘/private/var/folders/q3/0qq1vm5538l657ffhr1hxj6m0000gn/T/RtmpQ5VCcC/downloaded_packages’
  </code></pre>
  
  <p>Thanks In Advance,
      Jason E. </p>