Now here is the thing. I upgraded my Mac to the OS X EI Capitan a few days ago. And now MacTeX is not working. When I try to typeset it, the console shows the following error:
xelatex: command not found.
How can I fix it?
this is due to the new permission settings on Mac OS X El Capitàn. Here you can find a way to configure everything properly.
In that page (from which I copy), we find that
Cause of the problem:
MacTeX installs a symbolic link
/usr/texbin pointing to the TeX binaries. GUI applications use this link to find the binaries. But in El Capitan, the location
/usr is reserved for Apple, and even users with root access are not allowed to write to that location.
The solution to this problem is to relocate the link to
/Library/TeX/texbin, and reconfigure GUI applications to look in this location. Consequently, MacTeX-2015 and BasicTeX-2015 write two links,
/Library/TeX/texbin, when installing on systems earlier than El Capitan, and write
/Library/TeX/texbin when installing on El Capitan. These installations configure shell applications to look for TeX in both locations.
You, therefore, need only to reconfigure GUI, as instructed here.
Reconfiguring TeXLive Utility: Version 1.23 of TEX Live Utility automatically detects the loss of
/usr/texbin under El Capitan
and prompts the user to automatically fix the problem. Previous versions need manual fixing:
/Library/TeXand click ok
Reconfiguring TeXShop: As pointed out in this document, TeXShop versions from 3.52 onwards (July 2015) automatically redirect themselves to the correct link; if you cannot/want not update, you should:
And you should be good to go.
texbinto select it and Click on the Choose button to add
/Library/TeX/texbin. You can delete the
/usr/texbinitem by selecting it and clicking one the - button.
In my case after installing MacTex (on El Capitan) I was able to get a result for
xelatex --version in a new terminal window but not in the existing one running jupyter notebook (after canceling the running instance).
Solution: Close the terminal running jupyter open the terminal again test if
xelatex --version works now and run your
jupyter notebook or whatever command again