Answers: <p>This issue is due to the CTAN mirrors having yet to update. The issue appears in the <a href="https://travis-ci.community/t/latex-error-file-inconsolata-sty-not-found-only-on-osx-when-building-r-package/3261" rel="nofollow noreferrer">Travis R community forum</a>:</p>
  
  <blockquote>
    <p>might be related to the recent switch to TexLive-2019 as the LaTeX package manager seems to fail finding inconsolata in the repository.</p>
    
    <p>...</p>
    
    <p>It looks to me like the mirror chosen was has not updated to 2019, so I think this will resolve itself naturally when the mirrors catch up. If not I can look into it.</p>
  </blockquote>
  
  <p>In the meantime, I solved it by forcing a previous version of TeXLive with a downgrade to OSX 10.12 in <code>.travis.yml</code>:</p>
  
  <pre><code># macOS 10.12 version
  osx_image: xcode9.2
  </code></pre>
  
  <p>See <a href="https://docs.travis-ci.com/user/reference/osx#macos-version" rel="nofollow noreferrer">this Travis page</a> for the correspondence between XCode and OSX versions.</p>
  
Answers: CC BY-SA 4.0
Answers: 2019-05-03T13:33:24.503Z
Answers: 2019-05-03T14:01:06.237Z
Answers: 2019-05-03T14:01:06.237Z
Answers: emonigma
Body: <p>I am writing <a href="https://github.com/alan-turing-institute/PosteriorBootstrap" rel="nofollow noreferrer">an R package</a> and using Travis for Continuous Integration. The tests on macOS fail because the system has a newer version of TeXLive and is unable to install the <code>inconsolata</code> font to build vignettes.</p>
  
  <p>The Travis logs show:</p>
  
  <pre><code>sudo tlmgr install inconsolata upquote courier courier-scaled helvetic
  tlmgr: The TeX Live versions supported by the repository
  http://mirrors.concertpass.com/tex-archive/systems/texlive/tlnet
    (2016--2018)
  do not include the version of the local installation
    (2019).
  </code></pre>
  
  <p>and further on, R is unable to build the vignettes:</p>
  
  <pre><code>* checking PDF version of manual ... WARNING
  LaTeX errors when creating PDF version.
  This typically indicates Rd problems.
  LaTeX errors found:
  ! LaTeX Error: File `inconsolata.sty' not found.
  Type X to quit or &lt;RETURN&gt; to proceed,
  or enter new name. (Default extension: sty)
  ! Emergency stop.
  &lt;read *&gt; 
  
  l.276 ^^M
  
  !  ==&gt; Fatal error occurred, no output PDF file produced!
  * checking PDF version of manual without hyperrefs or index ... ERROR
  * DONE
  Status: 1 ERROR, 1 WARNING
  </code></pre>
  
  <p>This failure throws a warning for R, which is upgraded to an error because I have <code>warnings_are_errors: true</code> in <code>.travis.yml</code>.</p>
  
  <p>I tried <a href="https://stackoverflow.com/questions/34524357/inconsolata-missing-to-build-r-vignette/50243939#50243939">this StackOverflow answer</a> of reinstalling <code>inconsolata</code> in <code>.travis.yml</code>:</p>
  
  <pre><code>before_install:
    - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
        brew cask install basictex;
        sudo tlmgr update --self;
        sudo tlmgr update --all;
        sudo tlmgr install titling framed inconsolata;
        sudo tlmgr install collection-fontsrecommended;
      fi
  </code></pre>
  
  <p>and <a href="https://tex.stackexchange.com/questions/253599/repository-and-local-installation">this TexStackExchange thread</a> of changing the TeX repository and running the same commands as Travis does when installing the system:</p>
  
  <pre><code>before_install:
    - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
        sudo tlmgr option repository http://mirror.ctan.org/systems/texlive/tlnet;
        sudo tlmgr update --self
        sudo tlmgr install inconsolata upquote courier courier-scaled helvetic;
      fi  
  </code></pre>
  
  <p>and neither worked.</p>
  
  <p>How can I install the <code>inconsolata</code> font?</p>
  
Tags: <travis-ci><macos>
Title: Testing R package on Travis fails because of TeXLive incompatible versions
UserDisplayName: emonigma
ThreadText: # Testing R package on Travis fails because of TeXLive incompatible versions
  
  (Asked by: username_0 on 2019-05-03)
  
  I am writing [an R package](https://github.com/alan-turing-institute/PosteriorBootstrap) and using Travis for Continuous Integration. The tests on macOS fail because the system has a newer version of TeXLive and is unable to install the `inconsolata` font to build vignettes.
  
  The Travis logs show:
  
  ```
  sudo tlmgr install inconsolata upquote courier courier-scaled helvetic
  tlmgr: The TeX Live versions supported by the repository
  http://mirrors.concertpass.com/tex-archive/systems/texlive/tlnet
    (2016--2018)
  do not include the version of the local installation
    (2019).
  
  ```
  
  and further on, R is unable to build the vignettes:
  
  ```
  * checking PDF version of manual ... WARNING
  LaTeX errors when creating PDF version.
  This typically indicates Rd problems.
  LaTeX errors found:
  ! LaTeX Error: File `inconsolata.sty' not found.
  Type X to quit or <RETURN> to proceed,
  or enter new name. (Default extension: sty)
  ! Emergency stop.
  <read *> 
  
  l.276 ^^M
  
  !  ==> Fatal error occurred, no output PDF file produced!
  * checking PDF version of manual without hyperrefs or index ... ERROR
  * DONE
  Status: 1 ERROR, 1 WARNING
  
  ```
  
  This failure throws a warning for R, which is upgraded to an error because I have `warnings_are_errors: true` in `.travis.yml`.
  
  I tried [this StackOverflow answer](https://stackoverflow.com/questions/34524357/inconsolata-missing-to-build-r-vignette/50243939#50243939) of reinstalling `inconsolata` in `.travis.yml`:
  
  ```
  before_install:
    - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
        brew cask install basictex;
        sudo tlmgr update --self;
        sudo tlmgr update --all;
        sudo tlmgr install titling framed inconsolata;
        sudo tlmgr install collection-fontsrecommended;
      fi
  
  ```
  
  and [this TexStackExchange thread](https://tex.stackexchange.com/questions/253599/repository-and-local-installation) of changing the TeX repository and running the same commands as Travis does when installing the system:
  
  ```
  before_install:
    - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
        sudo tlmgr option repository http://mirror.ctan.org/systems/texlive/tlnet;
        sudo tlmgr update --self
        sudo tlmgr install inconsolata upquote courier courier-scaled helvetic;
      fi  
  
  ```
  
  and neither worked.
  
  How can I install the `inconsolata` font?
  
  **Tags:** travis-ci, macos
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_0 on 2019-05-03. Score: 1
  
  This issue is due to the CTAN mirrors having yet to update. The issue appears in the [Travis R community forum](https://travis-ci.community/t/latex-error-file-inconsolata-sty-not-found-only-on-osx-when-building-r-package/3261):
  
  > might be related to the recent switch to TexLive-2019 as the LaTeX package manager seems to fail finding inconsolata in the repository.
  >
  > ...
  >
  > It looks to me like the mirror chosen was has not updated to 2019, so I think this will resolve itself naturally when the mirrors catch up. If not I can look into it.
  
  In the meantime, I solved it by forcing a previous version of TeXLive with a downgrade to OSX 10.12 in `.travis.yml`:
  
  ```
  # macOS 10.12 version
  osx_image: xcode9.2
  
  ```
  
  See [this Travis page](https://docs.travis-ci.com/user/reference/osx#macos-version) for the correspondence between XCode and OSX versions.
  
  
  ---
  
  