小牛队更新后,RStudio 找不到 LaTeX [英] RStudio can't find LaTeX after Mavericks update

查看:98
本文介绍了小牛队更新后,RStudio 找不到 LaTeX的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用 RStudio 在我的系统上使用 Sweave 已经有一段时间了.但是,我最近将我的 Mac OS 从 Lion 升级到了 Mavericks.

I have been using Sweave for quite sometime on my system using RStudio. However, I recently upgraded my Mac OS from Lion to Mavericks.

这导致了几个问题:首先,RStudio 无法找到 R 库,并且无法启动.我重新安装了 RStudio,但仍然遇到同样的问题.所以我重新安装了 R 和 RStudio,然后 RStudio 开始工作.

This caused several issues: First, RStudio was not able to locate the R library, and it just wont start. I reinstalled RStudio, but still got the same issue. So I reinstalled both R and RStudio, and then RStudio started to work.

现在,RStudio 仍然无法定位 TeX 安装,并给我以下警告:未检测到 TeX 安装.请在编译前安装 TeX."

And now, RStudio is still not able to locate TeX installation, and gives me the following warning: "No TeX installation detected. Please install TeX before compiling."

这可能会通过重新安装来解决,但我宁愿避免重新下载 TeX (~2.3G).

This will probably get fixed by a reinstall, but I would prefer to avoid a fresh download of TeX (~2.3G).

有关如何解决此问题的任何想法?

Any ideas on how to resolve this?

推荐答案

RStudio 期望 pdflatex 在系统路径上(即输入 Sys.which("pdflatex") 在 R 控制台应返回 pdflatex 的路径).

RStudio expects pdflatex to be on the system path (i.e. entering Sys.which("pdflatex") at the R console should return the path to pdflatex).

您可以通过让 pdflatex 回到系统路径来解决问题:

You can fix the problem by getting pdflatex back on the system path:

  1. 找到pdflatex 安装在系统上的路径——可能是/usr/texbin,但使用find/usr -name pdflatex如果您需要帮助.
  2. 在包含此路径的 /etc/paths.d 中创建一个名为 TeX 的文件.
  1. Find the path where pdflatex is installed on your system--likely /usr/texbin, but use find /usr -name pdflatex if you need help.
  2. Create a file called TeX in /etc/paths.d that contains this path.

例如:

$ sudo -s "echo /usr/texbin > /etc/paths.d/TeX"

您需要重新启动才能应用更改.

You'll need to restart to apply the changes.

这篇关于小牛队更新后,RStudio 找不到 LaTeX的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆