TeXLive 2015: I installed TeXLive 2015 following the simplest instruction sudo ./install-tl-ubuntu (without any options) of scottkosty/install-tl-ubuntu@GitHub.
Vim-Latex-Suite: I installed Vim-Latex-Suite following these Installation Instructions, including these recommended settings.
However, \ll (to compile .tex in Latex-Suite) does not work.
The command :!latex -interaction=nonstopmode % shows
/bin/bash: latex: command not found
shell returned 127 My current configurations:
echo $PATH in ubuntu shows:
/opt/texbin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:echo $PATH in vim shows:
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/binwhich latex shows /opt/texbin/latex;
and latex --version shows
pdfTeX 3.14159265-2.6-1.40.16 (TeX Live 2015)
kpathsea version 6.2.1
Copyright 2015 Peter Breitenlohner (eTeX)/Han The Thanh (pdfTeX).
There is NO warranty. Redistribution of this software is
covered by the terms of both the pdfTeX copyright and
the Lesser GNU General Public License.
For more information about these matters, see the file
named COPYING and the pdfTeX source.
Primary author of pdfTeX: Peter Breitenlohner (eTeX)/Han The Thanh (pdfTeX).
Compiled with libpng 1.6.17; using libpng 1.6.17
Compiled with zlib 1.2.8; using zlib 1.2.8
Compiled with xpdf version 3.04Two methods which do not work:
- Adding
export PATH=$PATH:/opt/texbin/to file.bashrc The method from TeX Live and vim-latexsuite PATH problems does not work for me:
$ cat /etc/profile.d/latex.sh export PATH="${PATH}:/usr/local/texlive/2015/bin/x86_64-linux"
ADDED: By the way, in my another Ubuntu system with latex installed in another way, which latex gives /usr/bin/latex and vim-latex works.
1 Answer
The script sudo ./install-tl-ubuntu will install latex at /opt/texbin, where is not a default path(/usr/local/texlive/2015/bin/x86_64-linux) for latex.
It seems you have installed two latex, any one of them should work in case you set their corresponding $PATH in .bashrc.
I note that your shell and vim have different $PATH. Vim cannot find latex with it’s $PATH.
It is not likely that you started vim in an old shell as you restarted your computer.
I guess you run vim with sudo, as sudo uses root's environment, where usually keeps a default $PATH, exactly the same value in your vim.