Setting environment variables (TEXINPUTS) in El Capitan
The problem is well known and is due to Apple - the /usr folder cannot be anymore written. The solution is to add a link to this location: /Library/TeX/texbin - depending also on your TeX version, see more info in this link: https://tug.org/mactex/elcapitan.html