Sunday, April 28, 2024
 Popular · Latest · Hot · Upcoming
3
rated 0 times [  3] [ 0]  / answers: 1 / hits: 1312  / 1 Year ago, tue, march 14, 2023, 5:49:11

I've installed the current version of texlive (2012), which installs its binaries into /usr/local/texlive/2011/bin/i386-linux/. I subsequently added this directory to the PATH variable by modifying the /etc/environment file, since I want this installed for all users:



PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/texlive/2012/bin/i386-linux"


I then proceeded to remove the texlive apt-suite packages, since I was getting errors when trying to compile .tex documents that showed me a texlive 2009 distribution came prepackaged with my Lubuntu 12.04.



Now something pretty strange happens:



~ which pdflatex
/usr/local/texlive/2012/bin/i386-linux/pdflatex


So it seems the binary is being found. Still, the following happens:



~ pdflatex foo.tex
/usr/bin/pdflatex: File not found!


Why is it looking ìn /usr/bin/? Is this some kind of bash internal cache for binary locations (I vaguely remember hearing something about this)?



What would be a possible fix?


More From » 12.04

 Answers
6

Very likely /usr/bin/pdflatex is a symbolic link to the package you just removed, which in turn doesn't exist. Try ls -l /usr/bin/pdflatex to see if it points to another file. If it's a broken symlink (the target doesn't exist) you can simply remove it and the next pdflatex in the PATH should be run.



which actually looks for the first executable in the PATH which exists. In other words, if you ln -s /non-existing/path /usr/local/sbin/pdflatex it will be ignored by which, even though /usr/local/sbin is first in the PATH.


[#31025] Wednesday, March 15, 2023, 1 Year  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
terose

Total Points: 185
Total Questions: 125
Total Answers: 131

Location: Venezuela
Member since Mon, Dec 13, 2021
2 Years ago
terose questions
;