Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/github/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Github Travis CI因安装依赖项超时而失败_Github_Deployment_Continuous Integration_Latex_Travis Ci - Fatal编程技术网

Github Travis CI因安装依赖项超时而失败

Github Travis CI因安装依赖项超时而失败,github,deployment,continuous-integration,latex,travis-ci,Github,Deployment,Continuous Integration,Latex,Travis Ci,我的Github repo的Travis CI不断失败,我不知道为什么,直到我阅读了作业日志,发现许多依赖项无法下载到它们的机器上 例如,xcolor软件包未能安装: [20/23, 03:54/04:02] install: xcolor [17k] Downloading ftp://tug.org/historic/systems/texlive/2015/tlnet-final/archive/xcolor.tar.xz did not succeed, please retry

我的Github repo的Travis CI不断失败,我不知道为什么,直到我阅读了作业日志,发现许多依赖项无法下载到它们的机器上

例如,
xcolor
软件包未能安装:

[20/23, 03:54/04:02] install: xcolor [17k]
Downloading 
   ftp://tug.org/historic/systems/texlive/2015/tlnet-final/archive/xcolor.tar.xz
did not succeed, please retry.
TLPDB::_install_package: couldn't unpack ftp://tug.org/historic/systems/texlive/2015/tlnet-final/archive/xcolor.tar.xz to /home/travis/texmf
这将导致以下错误:

Latexmk: Missing input file: 'xcolor.sty' from line
  '! LaTeX Error: File `xcolor.sty' not found.'
Latexmk: Log file says no output from latex
Latexmk: For rule 'pdflatex', no output was made
问题是我正在从事一个LaTeX项目,LaTeX环境往往非常庞大,有很多支持包。以下是我的
设置.sh的相关部分,这已经是最低要求:

sudo tlmgr install \
    xkeyval ifthen amsmath bm \
    longtable ctex tabu array \
    colortbl berasans graphicx longtable \
    etoolbox lastpage amssymb mathrsfs \
    multirow xeCJK environ after \
    booktabs hyperref epstopdf tabu \
    fancyhdr listings amsfonts latexsym \
    hhline CJK longtable pifont \
    geometry ifpdf bmpsize hologo \
    fancybox appendix amsbsy paralist \
    tabularx xCJK2uni hologo calc \
    fontenc ifxetex xcolor palatino
我是否可以确保在构建阶段之前成功下载并安装所有必需的包,比如让服务器重试几次?如果是,如何进行?

来自:

如果尝试下载依赖项时出现网络超时,请使用依赖项管理器的内置重试功能,或将安装命令包装在
travis\u retry
函数中

例如,在您的
.travis.yml
中:

install: travis_retry pip install myawesomepackage
travis\u retry
如果返回代码非零,将尝试向上三次。

来自:

如果尝试下载依赖项时出现网络超时,请使用依赖项管理器的内置重试功能,或将安装命令包装在
travis\u retry
函数中

例如,在您的
.travis.yml
中:

install: travis_retry pip install myawesomepackage

travis\u retry
如果返回代码为非零,则将尝试三次。

近几个月来,此类故障的频率有所增加。我不知道如何避免它,但每当我遇到这样的失败时,我就会重新启动构建,一般来说,它会在第二次成功。您使用的是精确的构建环境还是可靠的构建环境?我仍然坚持精确,但我想知道Trusty的情况是否会更好。近几个月来,此类失败的频率有所增加。我不知道如何避免它,但每当我遇到这样的失败时,我就会重新启动构建,一般来说,它会在第二次成功。您使用的是精确的构建环境还是可靠的构建环境?我仍然坚持精确,但我想知道Trusty的情况是否会更好。