3

Hi Apple changed the security model in MacOSX 10.11 El Capitan. Although 10.11 is still public beta it is unlikely that the security model will be any different in the final release.

What this means is that for example the directory /usr/bin is no longer accessible (not even with root) so any software paths that link to this directory are not working any more. As for example MacTex or R.

MacTex noticed this problem and state one their website:

MacTeX installs the link /usr/texbin, pointing indirectly to the binaries of TeX Live. In El Capitan, users cannot write to the location /usr, even if they have Administrator permission. Consequently, MacTeX-2015 and BasicTeX-2015 install two symbolic links on all systems earlier than El Capitan: /usr/texbin and /Library/TeX/texbin. Only the second link is installed on future systems.

MacTeX installs four GUI apps: BibDesk, LaTeXiT, TeX Live Utility, and TeXShop. Many users have other GUI front ends and utilities. All of these programs currently are configured to find binaries in /usr/texbin. Over the summer, users should reconfigure their GUI apps to use /Library/TeX/texbin. They will notice no change. This reconfiguration will be mandatory once El Capitan is released.

Now I wonder how we can change the $PATH variable for R to work in the terminal (bash) again on OSX 10.11. ? I could not find any help on how to do that. At this moment by typing R in the terminal the following error message is produced although R installed successfully: R: command not found

Lilly Kuil
  • 55
  • 9
  • Reinstalling R and MacTeX should fix this. I use both on El Cap daily and they work fine in all ways. https://rud.is/b/2015/10/22/installing-r-on-os-x-100-homebrew-edition/ & https://rud.is/b/2015/10/20/installing-r-on-os-x/ are two guides I've written for installing all necessary components for full OS X R setups. – hrbrmstr Nov 14 '15 at 13:45

2 Answers2

0

Whilst /usr is off limits, /usr/local and /usr/local/libexec are available and should be used instead for 3rd party binary applications.

Apple has stated, for the final (GM) release of 10.11, that any 3rd party applications which are present in system folders (e.g. /usr) during installation of El Capitan are subject to being moved by the installer. I suspect they will be moved to /usr/local.

It is up to developers to update their software to work with the security system and paths.

If the R command is not found, then locate the binary and update your $PATH variable.

Community
  • 1
  • 1
TheDarkKnight
  • 27,181
  • 6
  • 55
  • 85
  • Hmm. I don't currently see ANYTHING under /usr as 'available' all are readonly outside of root. That stinks. – uchuugaka Aug 27 '15 at 06:28
  • @uchuugaka, it may have changed since the first Developer Release. I'll check and get back to you. – TheDarkKnight Aug 27 '15 at 07:55
  • @uchuugaka, after updating to Developer Release 7, I can still install our software to /usr/local/libexec, so don't know why you're not able to. Perhaps it's something the Installer can do, but not a user via the command line. – TheDarkKnight Aug 27 '15 at 10:15
  • Any installer requiring admin authorization is basically the same as sudo. So I'm not surprised an installer would work, unless you tell me the installer did not require an admin password – uchuugaka Aug 27 '15 at 13:52
  • @uchuugaka It does require an admin password, though with the new 'System Integrity Protection' (aka rootless) in 10.11, root, via sudo, no longer has privileges to write to system folders. – TheDarkKnight Aug 27 '15 at 14:39
  • almost. See this snapshot from wwdc 2015. http://arstechnica.com/civis/viewtopic.php?p=29189797#p29189797 – uchuugaka Aug 27 '15 at 15:52
  • I'm trying to figure out if those dirs should require sudo or not. My understanding was no. Installer.app absolutely does run priviledged as a different user. Rootless/SIP is not fully baked but often oversimply stated. :( – uchuugaka Aug 27 '15 at 15:54
0

There are two options:

  1. update Tex, e.g. MacTex-2015 https://www.tug.org/mactex/ which should (not tried yet) fix the paths for you

  2. update the paths yourself from a Terminal window:

    • First you have to create a standard (and short location):
      ln -s /Library/TeX/Distributions/TeXLive-2013.texdist/Contents/Programs/texbin/ /Library/TeX/texbin
      This creates a link to the binary folder as /Library/TeX/texbin

    • Then you need to fix your global PATH variable:
      sudo sed -i -e "s/usr/Library\/TeX/" /etc/paths.d/TeX

    Or you can do in one (probably un-elegant) line:

    sudo sed -i -e "s/usr/Library\/TeX\/Distributions\/TeXLive-2013.texdist\/Contents\/Programs/" /etc/paths.d/TeX

Marco Torchiano
  • 712
  • 7
  • 21