The new Mac OS comes with a feature named "rootless" that disallows modification of important system files, even by the root user.
However, LaTeX installation requires access to the
/usr/texbin folder, at least as an alias, and it is protected by Mac OS.
There are two solutions:
1) Disable the rootless feature
To disable the rootless feature at boot, run this command:
sudo nvram boot-args="rootless=0 kext-dev-mode=1"
Reboot, and then run:
sudo ln -s /Library/TeX/Distributions/.DefaultTeX/Contents/Programs/texbin /usr/texbin
if you already installed LaTeX from MacTex
2) Edit your
If you don't want to disable the rootless feature, you can just modify your
$PATH to point to the location of your LaTeX installation.
For MacTex, files are located under
/Library/TeX/Distributions/.DefaultTeX/Contents/Programs/texbin, so the following command in your
.bash_profile should work: