首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >由于TeXLive不兼容版本,在Travis上测试R包失败

由于TeXLive不兼容版本,在Travis上测试R包失败
EN

DevOps用户
提问于 2019-05-03 13:30:03
回答 1查看 144关注 0票数 1

我正在编写R包并使用Travis进行持续集成。在macOS上的测试失败是因为系统有一个更新的TeXLive版本,并且无法安装inconsolata字体来构建小片段。

特拉维斯日志显示:

代码语言:javascript
复制
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).

更有甚者,R也无法建立这样的小插曲:

代码语言:javascript
复制
* 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  to proceed,
or enter new name. (Default extension: sty)
! Emergency stop.
 

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

此故障会引发对R的警告,因为我在warnings_are_errors: true中有.travis.yml,因此将其升级为错误。

我尝试过在这个StackOverflow的答案中重新安装inconsolata

代码语言:javascript
复制
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

以及在安装系统时更改TeX存储库并运行与Travis相同的命令的TeX:

代码语言:javascript
复制
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  

但都没起作用。

如何安装inconsolata字体?

EN

回答 1

DevOps用户

发布于 2019-05-03 13:33:24

此问题是由于CTAN镜像尚未更新。该问题出现在Travis R社区论坛中:

这可能与最近转向TXLive2019有关,因为LaTeX包管理器似乎无法在存储库中找到安慰。..。在我看来,所选择的镜子还没有更新到2019年,所以我认为当镜子迎头赶上的时候,这会自然地解决问题。如果不是,我可以调查一下。

同时,我通过强制使用以前版本的TeXLive将.travis.yml降级为OSX10.12来解决这个问题:

代码语言:javascript
复制
# macOS 10.12 version
osx_image: xcode9.2

有关这个特拉维斯页面和OSX版本之间的通信,请参见XCode。

票数 1
EN
页面原文内容由DevOps提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://devops.stackexchange.com/questions/8012

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档