0

What is configured wrong or how do I find out?

I expect my pdflatex command to function.

$ pdflatex file.tex 
bash: /usr/local/texlive/2016/bin/x86_64-linux/pdflatex: file not found

It does not. More explicitly called pdflatex starts correctly.

$ /usr/local/bin/pdflatex file.tex
This is pdfTeX, Version 3.14159265-2.6-1.40.18 (TeX Live 2017) (preloaded format=pdflatex)
restricted \write...

I recently deleted and purged with apt texlive 2016. However, what can be configured wrong?

$ which pdflatex
/usr/local/bin/pdflatex
$ ll /usr/local/bin/pdflatex
lrwxrwxrwx 1 root staff 49 Jul  1 11:07 /usr/local/bin/pdflatex -> /usr/local/texlive/2017/bin/x86_64-linux/pdflatex
Jeff Schaller
  • 66,199
  • 35
  • 114
  • 250
Stefan Bollmann
  • 185
  • 1
  • 1
  • 7

1 Answers1

4

Your first command is referencing the 2016 version, that you've purged. The second and third segments reference the 2017 version, which you demonstrate works as expected.

bash, in common with other shells, keeps track of which commands are in which directory. (This avoids a $PATH search on every invocation.) Now you've changed the target directory you need to tell the shell to clear its cache and start over

hash       # Optionally, show the contents of the hash list
hash -r    # Reset (clear) the hash list
roaima
  • 107,089
  • 14
  • 139
  • 261