Install TinyTeX: certificate has expired

Hi,

I am trying to install TinyTeX in R (v 3.6.3) but am getting a persistent error about expired certificates (see below). A similar error is raised here: tinytex certificate is out of date?, the solution being changing the repository argument in install_tinytex(). I've tried this ( e.g., tinytex::install_tinytex(repository = 'http://mirror.aut.ac.nz/CTAN/')) with no luck - I still get the same error.

Any ideas on how to try and fix this would be so greatly appreciated!

tinytex::install_tinytex()
trying URL 'https://yihui.org/tinytex/TinyTeX-1.tgz'
trying URL 'https://yihui.org/tinytex/TinyTeX-1.tgz'
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
curl: (60) SSL certificate problem: certificate has expired
More details here: https://curl.haxx.se/docs/sslcerts.html

curl performs SSL certificate verification by default, using a "bundle"
 of Certificate Authority (CA) public keys (CA certs). If the default
 bundle file isn't adequate, you can specify an alternate file
 using the --cacert option.
If this HTTPS server uses a certificate signed by a CA represented in
 the bundle, the certificate verification probably failed due to a
 problem with the certificate (it might be expired, or the name might
 not match the domain name in the URL).
If you'd like to turn off curl's verification of the certificate, use
 the -k (or --insecure) option.
HTTPS-proxy has similar options --proxy-cacert and --proxy-insecure.
Error in download.file(url, output, ..., method = method) : 
  'curl' call had nonzero exit status
In addition: Warning messages:
1: In download.file(url, output, ..., method = method) :
  URL 'https://yihui.org/tinytex/TinyTeX-1.tgz': status was 'Peer certificate cannot be authenticated with given CA certificates'
2: In download.file(url, output, ..., method = method) :
  URL 'https://yihui.org/tinytex/TinyTeX-1.tgz': status was 'Peer certificate cannot be authenticated with given CA certificates'

Thanks for the report. We'll look into this to see if there is something on our server missing.

Can you try this in the meantime ?

tinytex::install_tinytex(version = "2021.10")

This would install the last bundled version (from https://github.com/yihui/tinytex-releases) instead of the latest daily build.

Thanks Christophe!

No problems running that code:

trying URL 'https://github.com/yihui/tinytex-releases/releases/download/v2021.10/TinyTeX-1-v2021.10.tgz'
Content type 'application/octet-stream' length 87001909 bytes (83.0 MB)
==================================================
downloaded 83.0 MB

But then (after restarting R studio) knitting a pdf document fails:

/usr/local/bin/tlmgr: TLPDB::from_file could not initialize from: https://mirror.ctan.org/systems/texlive/tlnet/tlpkg/texlive.tlpdb
/usr/local/bin/tlmgr: Maybe the repository setting should be changed.
/usr/local/bin/tlmgr: More info: https://tug.org/texlive/acquire.html
! LaTeX Error: File `lineno.sty' not found.

! Emergency stop.
<read *>

Not sure if this is the same issue - or a seperate one caused by me frantically trying to fix the first one...

Cheers,
Matt.

Hi!

I have the same problem. Suddenly I can not knit to pdfs, although it worked perfectly. I test run it on files which compiled before. I am getting the following error message:

I then tried reinstalling TinyTeX by running

install.packages('tinytex')
tinytex::install_tinytex() # install TinyTeX

and get the same error as Mres.

Any ideas what is happening?

Thank you!

Best, M.

This is the error that I get after running

tinytex::install_tinytex() # install TinyTeX

Thanks!

I think this is an issue with the online CTAN mirror. It could resolve by itself. Please retry.

Otherwise, you can try use another CTAN mirror to install LaTeX package from

Certainly looks that way.
I've got it working by specifying both a version and repository in the install_tinytex function:

tinytex::install_tinytex(repository = "http://mirrors.tuna.tsinghua.edu.cn/CTAN/", version = "latest")

Thanks so much for your help!

1 Like

Thanks!!!! This worked for me as well!!!!!

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.