r - Miktex did not succeed after I updated R to version 3.5.0
问题描述
After I updated R to version 3.5.0, I couldn't start my MikTex from Rstudio,
---
output:
pdf_document:
latex_engine: xelatex
includes:
in_header: header.tex
keep_tex: yes
---
Above is the code I typed ahead of my Rmd, and after knitring,
Sorry, but D:\miktex\miktex\bin\x64\xelatex.exe did not succeed.
The log file hopefully contains the information to get MiKTeX going again:
C:/Users/DELL/AppData/Local/MiKTeX/2.9/miktex/log/xelatex.log
Information showed in xelatex.log:
2018-04-29 10:06:17,482+0800 FATAL xelatex - Info:
2018-04-29 10:06:17,482+0800 FATAL xelatex - Source: Libraries\MiKTeX\UI\Qt\mikuiqt.cpp
2018-04-29 10:06:17,482+0800 FATAL xelatex - Line: 45
2018-04-29 10:06:17,482+0800 INFO xelatex - finishing with exit code 1
2018-04-29 10:06:17,626+0800 INFO xelatex - starting with command line: D:\miktex\miktex\bin\x64\xelatex.exe -halt-on-error -interaction=batchmode 1.tex
2018-04-29 10:06:17,631+0800 INFO xelatex - allowing known shell commands
2018-04-29 10:06:17,632+0800 INFO xelatex - enabling input (output) from (to) processes
2018-04-29 10:06:17,812+0800 FATAL xelatex - GUI framework cannot be initialized.
And after I tried:
Sys.which("xelatex")
xelatex
"D:\\miktex\\miktex\\bin\\x64\\xelatex.exe"
Sys.setenv("PATH" = "D:\miktex\miktex\bin\x64\xelatex.exe" )
then knitr again:
Warning messages:
1: In system2(..., stdout = FALSE, stderr = FALSE) : '"xelatex"' not found
2: In system2(...) : '"xelatex"' not found
No TeX installation detected (TeX is required to create PDF output). You should install a recommended TeX distribution for your platform:
Windows: MiKTeX (Complete) - http://miktex.org/2.9/setup
(NOTE: Be sure to download the Complete rather than Basic installation)
Could anyone help? Thanks.
解决方案
如前所述,您可以更改默认设置并让 MiKTeX 安装缺少的 LaTeX 包而无需询问:
从 MiKTeX 控制台 → 设置 → “始终即时安装丢失的软件包”。
推荐阅读
- python - ValueError: Expected 2D array, got 1D array instead: 对于矩阵?
- forms - SwiftUI 表单中的动态行高
- python - 只下载了 5 中的一个图像,它敲出一个错误
- airflow - 气流未从 DAG 获取“start_date”
- c# - 是否可以通过SqlDataReader 获取SQL 列的长度?
- django - Django 频道实时聊天保存发送的消息
- pyspark - 无法将 StringIndexer 作为列表传递给模型管道阶段
- azure-cli - az login 使用受密码保护的证书
- apache-kafka - 多个 StreamListeners 到同一个主题,Spring Cloud Stream 连接到 Kafka
- r - 如何将数据库表从磁盘数据库复制到 R 中的“内存”数据库?