【问题标题】:Install TinyTex on a Ubuntu based Docker image: cannot verify yihui.org's certificate在基于 Ubuntu 的 Docker 镜像上安装 TinyTex:无法验证 yihui.org 的证书
【发布时间】:2021-03-06 02:33:25
【问题描述】:

我正在尝试构建一个基于 ubuntu:20.04 的 Docker 映像,其中包含 R 和支持 PDF 的 bookdown。但我得到ERROR: cannot verify yihui.org's certificate [...]tinytex::install_tinytex()

> tinytex::install_tinytex()
trying URL 'https://yihui.org/tinytex/TinyTeX-1.tar.gz'
trying URL 'https://yihui.org/tinytex/TinyTeX-1.tar.gz'
--2020-11-23 09:19:05--  https://yihui.org/tinytex/TinyTeX-1.tar.gz
Resolving yihui.org (yihui.org)... 167.99.129.42, 134.209.226.211
Connecting to yihui.org (yihui.org)|167.99.129.42|:443... connected.
ERROR: cannot verify yihui.org's certificate, issued by 'CN=SSL-SG1-GROBU,OU=Operations,O=Cloud Services,C=US':
  Unable to locally verify the issuer's authority.
To connect to yihui.org insecurely, use `--no-check-certificate'.
Error in download.file(url, output, ..., method = method) :
  'wget' call had nonzero exit status
Calls: <Anonymous> ... download_file -> <Anonymous> -> download -> download.file
In addition: Warning messages:
1: In download.file(url, output, ..., method = method) :
  URL 'https://yihui.org/tinytex/TinyTeX-1.tar.gz': status was 'SSL peer certificate or SSH remote key was not OK'
2: In download.file(url, output, ..., method = method) :
  URL 'https://yihui.org/tinytex/TinyTeX-1.tar.gz': status was 'SSL peer certificate or SSH remote key was not OK'
You may have to restart your system after installing TinyTeX to make sure ~/bin appears in your PATH variable (https://github.com/yihui/tinytex/issues/16).
Execution halted

我需要找到一种方法来验证和信任来自yihui.org 的证书链,因为我不允许绕过--no-check-certificate 的验证。

提前感谢您的任何提示! 米海

【问题讨论】:

    标签: tinytex


    【解决方案1】:

    默认的 docker 镜像没有安装证书,因此也没有根证书。这就是错误消息Unable to locally verify the issuer's authority 所指示的内容。您可以从包ca-certificates获取根证书(通过apt-get安装)。

    【讨论】:

    • 这并没有提供问题的答案。要批评或要求作者澄清,请在他们的帖子下方留下评论。 - From Review
    • @majidhajibaba 您是否检查过我的建议没有回答问题? ;)
    • 请多解释一下您的答案,以便对有类似问题的其他用户有用。
    • @majidhajibaba“请解释你的答案”不等于“这不是答案”。请注意您的评论。
    猜你喜欢
    • 2022-01-01
    • 1970-01-01
    • 2019-08-25
    • 1970-01-01
    • 2020-01-28
    • 2014-12-03
    • 2015-12-20
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多