0

I had a version of MacTex 2014. I needed to use latexdiff but this latter command did not work on a terminal. So I installed latexdiff as a package from CTAN, by using its make file.

After this installation I could not compile latex anymore. I get the following error message:

/usr/texbin/pdflatex does not exist. TeXShop is a front end for TeX, 
but you also need a TeX distribution. Perhaps such a distribution was not
 installed or was removed during a system upgrade. If so, go to 
http://tug.org/mactex and follow the instructions to install MacTeX or BasicTeX.

I have tried to locate pdf latex on my Mac terminal typing 'locate pdflatex'. I get several paths for directories. The relevant ones seems to be:

/usr/local/texlive/2014/bin/x86_64-darwin/pdflatex
/usr/local/texlive/2014/bin/universal-darwin/pdflatex

So I tried to change the path settings in TexShop preferences. I tried to change /usr/texbin with either of the two paths above, without the 'pdflatex part', just the directory. The error persists.

I tried to manually delete all the TeX files on my machine and to re-install MacTeX. The error persists.

When I type which pdflatex or which latex on a terminal a get nothing, an empty line, even after re-installation of MacTex.

How to solve this? Any advice is highly appreciated. Thanks beforehand


Thanks for your replies!

1) My MacOS's version is 10.9.5

2) when I type echo $PATH I get: /Users/my_name/anaconda3/bin:/Users/my_name/anaconda/bin:/usr/local/bin:/usr/local/abin:/usr/local/fsl/bin:/Library/Frameworks/Python.framework/Versions/3.5/bin:/usr/bin:/bin

3) "Path setting" in TeXShop preferences is by default /usr/texbin but I have tried to changed it to the other two paths listed in my previous post and it doesn't work.

4) My TexShop version is 3.77

I have tried to update MacTex2017. My MacOS's version is supposed to be too old for that, but I have installed anyway and the installation went trough, the problem persists though.

Thanks!

  • 1
    Please provide some additional information: 1) What’s your MacOS’s version? 2) What reply do you get if you type echo $PATH on the command line? 3) Look at the TeXShop Preferences window: the Engine tab has a panel named “Path Setting”, which in turn has a subpanel labeled “(pdf)TeX (default: <something>)”; what’s this <something> in your case? – GuM Sep 27 '17 at 23:34
  • I forgot to ask: what version of TeXShop have you got? – GuM Sep 27 '17 at 23:44
  • Any chance you could update your TeX distribution to MacTeX2017? – Mico Sep 27 '17 at 23:47
  • The reply you get from echo $PATH$ is not as it should be. Please check the following: 1) Does a symbolic link named /Library/TeX/texbin exist on your system? 2) If so, what destination does it point to? 3) Does a file named /etc/paths.d/TeX exist on your system? 4) If so, what are its contents? – GuM Sep 29 '17 at 21:33
  • thanks for all your replies! I have edited my previous post with the additional information that you asked me. – Samsai Oct 2 '17 at 4:11
1

SOLVED - I have updated my MacOS to the latest version and now /Library/TeX/texbin appears in my $PATH. I have also updated MacTex to its latest 2017 version. Typing locate pdflatex on my terminal I find /usr/local/texlive/2017/bin/x86_64-darwin among other directories. I have changed Library/TeX/texbin in TeXShop preferences, engine tab, with /usr/local/texlive/2017/bin/x86_64-darwin and it now compiles.

Thanks for all the help and replies!

0

I once confronted with this problem with a little bit different environment. This problem raised after I upgrade the MacTeX and my OS had been updated to Mojave previously. It seems the reason is that the directory of the engine has been changed in this MacTeX upgrade and what I did to solve it is to change the engine directory to the right one.

Pretty simple: use Terminal, go to the /Library/TeX, can see there is two sub-directory: universal-darwin and x86_64-darwin. I choose the latter one as the final solution as my Mac is based on x86 chips. Thus, the final right directory would be /Library/TeX/bin/x86_64-darwin.

Go to the TeXShop’s preference. Go to the ‘engine’. Change it.

Hope this answer is helpful.

0

In my case (a mac user), running MikTexConsole was the only way to resolve (modify environment variable PATH, https://miktex.org/howto/modify-path) it, https://miktex.org/download

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.