How to set PATH to pdfLaTeX on Ubuntu 12.04
r, rstudio, ubuntu
Solution
You need to install texlive. Use this at the command line:
sudo apt-get install texlive
# or if you want all the packages (big install)
sudo apt-get install texlive-full
It will be installed into a location that is already on your path too so you won't need to fiddle with the PATH to get it to work once it's installed.
Problem
When I attempt to build my package, `saber`, I get the following error message in the RStudio Compile PDF window. ``` Unabled to find specified LaTeX program 'pdfLaTeX' on the system path ``` The R-bloggers post describes the problem I'm experiencing. So I run: ``` > Sys.which("pdflatex") pdflatex "" > Sys.getenv("PATH") [1] "/usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games" ``` That second path seems absolutely wrong. The problem is, I'm still in my first year working on a linux-based system and have no idea what to change so that `pdfLaTeX` is in the path. I admittedly don't spend a lot of time running commands in the terminal, and need some guidance on how to get this fixed so I can build the package without errors. How do I find, then change the PATH so that `pdfLaTeX` is in the path? ``` > version _ platform x86_64-pc-linux-gnu arch x86_64 os linux-gnu system x86_64, linux-gnu status major 3 minor 1.0 year 2014 month 04 day 10 svn rev 65387 language R version.string R version 3.1.0 (2014-04-10) nickname Spring Dance ```