我正在编写R包并使用Travis进行持续集成。在macOS上的测试失败是因为系统有一个更新的TeXLive版本,并且无法安装inconsolata字体来构建小片段。
特拉维斯日志显示:
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也无法建立这样的小插曲:
* 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:
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:
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字体?
发布于 2019-05-03 13:33:24
此问题是由于CTAN镜像尚未更新。该问题出现在Travis R社区论坛中:
这可能与最近转向TXLive2019有关,因为LaTeX包管理器似乎无法在存储库中找到安慰。..。在我看来,所选择的镜子还没有更新到2019年,所以我认为当镜子迎头赶上的时候,这会自然地解决问题。如果不是,我可以调查一下。
同时,我通过强制使用以前版本的TeXLive将.travis.yml降级为OSX10.12来解决这个问题:
# macOS 10.12 version
osx_image: xcode9.2有关这个特拉维斯页面和OSX版本之间的通信,请参见XCode。
https://devops.stackexchange.com/questions/8012
复制相似问题