11

Fresh install of Mac OS Sierra, fresh install of MacTeX. If I run with the terminal pdflatex I get

-bash: pdflatex: command not found

Any idea?

Thank you for help and answers.

Alan Munn
  • 218,180
Waldemar
  • 111
  • have you set the PATH variable? – naphaneal Oct 06 '16 at 15:34
  • Hello naphaneal, what do you exactly mean? Texshop:/Library/TeX/texbin, /usr/local/bin – Waldemar Oct 06 '16 at 15:36
  • maybe we try something first, before we meddle with the PATH. what does apropos pdflatex, whereis pdflatex and/or which pdflatex tell you? – naphaneal Oct 06 '16 at 15:44
  • sorry I can't follow your question. standard installation nothing changed. Before it was Yosemite and I install fresh Sierra. Has this something to do with Xcode. I'm already download it now. – Waldemar Oct 06 '16 at 15:49
  • these are commands you run in a Terminal. Xcode is only an IDE, in which you develop code. you don't need that in this case. I assume, that Mac OS Sierra is relatively new and so MacTeX and other software might not run properly because of changes in APIs and stuff in the OS. – naphaneal Oct 06 '16 at 16:01
  • When you upgrade, sometimes links get deleted, or file locations get changed. You could try creating new links, as mentioned here: http://tex.stackexchange.com/questions/163849/mavericks-upgrade-screwed-up-my-pdflatex-command-not-found (even if the directory is different, the principle is the same). To search for hidden files (i.e. to help locate the correct directory), this article may help: https://support.apple.com/en-us/HT202121 – Aces Oct 06 '16 at 16:04
  • @j.d. Those answers are now out of date, since things changed with El Capitan (and now Sierrra). – Alan Munn Oct 06 '16 at 16:08
  • @Alan_Munn, if you read my comment again, the second link is to help locate the current directories. Even if the directories are different, the principle of creating new links is the same. – Aces Oct 06 '16 at 16:09
  • Thank you for the comments. if I run echo $PATH /usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin I get this. – Waldemar Oct 06 '16 at 16:09
  • I'm little lost :-( The first time I install nothing todo. now this looks very complicated to me. – Waldemar Oct 06 '16 at 16:11
  • @j.d. Creating the links manually is not really a good idea. – Alan Munn Oct 06 '16 at 16:19

2 Answers2

11

According to post by Dick Koch on the macosx-tex mailing list:

This problem only concerns users who install Sierra on a new disk, rather than updating an existing system to Sierra.

If these users install MacTeX-2016 or BasicTeX-2016, they will discover that they cannot typeset from the command line. To fix this problem, download FixLink from my web site:

http://pages.uoregon.edu/koch/FixLink.pkg

This is a very, very small download package; install the package.

Eventually this fix will be moved to BasicTeX-2016 and MacTeX-2016, but before remaking those packages, I want to make sure this one creates no problems. I certainly tested FixLink on my own machine.

The technical problem is that Sierra does not create the folders /etc/paths.d or /etc/manpaths.d, so our packages have to create them. XQuartz creates the folders as well, so another solution is to install XQuartz before installing BasicTeX or MacTeX.

Fix included in latest MacTeX download

The revised MacTeX download, dated 09 October 2016, includes the fix. See:

https://tug.org/mactex/mactex-download.html

murray
  • 7,944
4

It looks like the MacTeX package installed tools into the /Library/TeX/Distributions/Programs/texbin directory and adds a symlink to it at /usr/texbin, which made it onto my $PATH. After upgrading to Sierra, this symlink disappeared.

If you're using the command line, you can add the installed texbin directory to your path:

export PATH="$PATH:/Library/TeX/Distributions/Programs/texbin"

Sticking the above line in your ~/.bash_profile will cause that install directory to be in your path for your terminal windows.

Del
  • 141