Page 1 of 1

[Solved] Locate executable for newly installed program?

Posted: Wed Sep 12, 2018 7:13 am
by tallyrand
Hi,
I'd like to use latex at the command line on mint. I issue the command 'latex' and am told

Command 'latex' not found, but can be installed with:
sudo apt install texlive-latex-base

I issue the suggested command and latex appears to install successfully. However, re-entering 'latex' then just leads to the same response as before. I'm guessing that I somehow have to add the directory where latex has been installed to my search path, but i don't know how to find that directory. Can anyone help?
tally

Re: Locate executable for newly installed program?

Posted: Wed Sep 12, 2018 7:16 am
by xenopeek
That package installs the binary /usr/bin/latex. If the directory /usr/bin is not in your PATH you have a real issue.

Check what is in your PATH:
echo $PATH
Check that the file /usr/bin/latex exists and is an executable:
file /usr/bin/latex

Re: Locate executable for newly installed program?

Posted: Wed Sep 12, 2018 7:29 am
by tallyrand
xenopeek wrote:
Wed Sep 12, 2018 7:16 am
That package installs the binary /usr/bin/latex. If the directory /usr/bin is not in your PATH you have a real issue.

Check what is in your PATH:
echo $PATH
Check that the file /usr/bin/latex exists and is an executable:
file /usr/bin/latex
Thank you. I ran the installation command again then used 'file /usr/bin/latex' to find that /usr/bin/latex is a symbolic link to pdftex and now all seems to be working. I'm not sure why it wasn't after my first installation attempt.

Re: [Solved] Locate executable for newly installed program?

Posted: Wed Sep 12, 2018 10:23 am
by BenTrabetere
Use the which command to locate commands. It will provide the full path to the executable.

Code: Select all

$ which latex
/usr/bin/latex