Mavericks upgrade screwed up my pdflatex (command not found)

Note: users on more recent versions of macOS will not be able to follow these instructions due to new restrictions introduced in those versions. See comments for workarounds.

It seems that the upgrade wiped the link from your Library (where MacTeX puts your actual TeX distribution) into your /usr/texbin. You can reinstate this link with the following:

ln -s /Library/TeX/Distributions/.DefaultTeX/Contents/Programs/texbin \
      /usr/texbin

This will essentially create a shortcut at /usr/texbin that points to your texbin in MacTeX's internal directory. You still should make sure that /usr/texbin is in your PATH environment variable, though.

NB. If you use DVI → PS → PDF, you may also need to repair the link to Ghostscript:

sudo ln -s /usr/local/bin/gs-noX11 /usr/local/bin/gs

For those less comfortable with the command line: I had this problem after upgrading to OSX 10.9.2 as well. After the upgrade, in my /Applications/TeX/ directory I found a FixMacTeX2013.pkg. Running this fixed the pdflatex issue.


The suggestion

ln -s /Library/TeX/Distributions/.DefaultTeX/Contents/Programs/texbin \
      /usr/texbin

did not quite work for me, because in my /Library/.../Programs I do not have the directory texbin, but rather two directories: i386 and powerpc. I have an Intel processor and thus used:

ln -s /Library/TeX/Distributions/.DefaultTeX/Contents/Programs/i386 \
      /usr/texbin

which worked fine.