title: R cmd check not locating texi2pdf on mac after R 3.1.3 upgrade
body: <p>Does anyone have a link to clear instructions on how to install and configure the necessary latex packages to build R packages on a mac?</p>
  
  <p>I have some scripts for building and checking R packages on a mac server. They seemed to work fine, but after upgrading to R 3.1.3, many of the packages started failing with</p>
  
  <pre><code>Error in texi2dvi(file = file, pdf = TRUE, clean = clean, quiet = quiet,  : 
    Running 'texi2dvi' on 'networkVignette.tex' failed.
  Messages:
  sh: /usr/local/bin/texi2dvi: No such file or directory
  Calls: &lt;Anonymous&gt; -&gt; texi2pdf -&gt; texi2dvi
  Execution halted
  </code></pre>
  
  <p>I found a thread which seemed to suggest I need a more recent version  texinfo (5.2) than what is installed by default. And apparently I've I've got the wrong version installed in the wrong location?</p>
  
  <pre><code>which texi2pdf
  /sw/bin/texi2pdf
  
  texi2pdf --version
  texi2pdf (GNU Texinfo 5.1) 5234
  </code></pre>
  
  <p>(same version is reported when running <code>system('texi2pdf --version')</code> in R  )</p>
  
  <p>This thread gives a link to a texinfo 5.2 source collection:</p>
  
  <p><a href="http://r.789695.n4.nabble.com/R-CMD-build-looking-for-texi2dvi-in-the-wrong-place-R-devel-td4701706.html" rel="nofollow noreferrer">http://r.789695.n4.nabble.com/R-CMD-build-looking-for-texi2dvi-in-the-wrong-place-R-devel-td4701706.html</a></p>
  
  <p>But I'm not familiar with installing executable from a tar.gz file on a mac.  The R mac help pages I found suggest installing MacTex, which I tried but that didn't seem to help. </p>
  
  <hr>
  
  <p>** Update: ** additional discussion of related problems on R-SIG-mac mailing list:
  <a href="https://groups.google.com/forum/#!topic/r-sig-mac/xjyuFdl5Ezk" rel="nofollow noreferrer">https://groups.google.com/forum/#!topic/r-sig-mac/xjyuFdl5Ezk</a></p>
  
  <hr>
  
  <p><strong>Update:</strong>
  Here is where I'm currently at:</p>
  
  <ol>
  <li><p>I removed my <code>/sw</code> directory to uninstall <code>fink</code> and all of its packages (couldn't figure out how to upgrade it)</p></li>
  <li><p>installed homebrew</p></li>
  <li><p><code>brew install texinfo</code>  installs version 5.2 the package, </p></li>
  </ol>
  
  <p><strong>but</strong> generates the message <code>This formula is keg-only, which means it was not symlinked into /usr/local</code>  and actually installs in in <code>/usr/local/Cellar/texinfo/5.2/bin</code> which means it is not on the path and R won't find it. </p>
  
  <ol start="4">
  <li><p>manually symlink each of the <code>texi2pdf</code>, <code>texi2dvi</code> , etc as vincent suggests (this is because R has the <code>/usr/local/bin</code> location as default in the <code>tools::texi2dvi</code> function?</p></li>
  <li><p>edited the <code>/etc/paths</code> file on the system to add <code>/usr/local/bin</code> so that finds the brew installed 5.2 version before it finds it before the osx system supplied version 4.6 version.  This may not be necessary because R has it hardcoded?</p></li>
  </ol>
  
  <p>All of this gets rid of the "can't find texi* errors", and gives me a bunch of latex errors (which I don't see on unix and windows builds) so I'm still kind of stuck. </p>
  
  <p>This seems very hackish, so there must be a cleaner way?  But it sounds like stuff with tex and mac is very sketchy at the moment? <a href="https://tex.stackexchange.com/questions/208181/why-did-my-tex-related-gui-program-stop-working-in-mac-os-x-yosemite">https://tex.stackexchange.com/questions/208181/why-did-my-tex-related-gui-program-stop-working-in-mac-os-x-yosemite</a></p>