R in public beta of El Capitan (new security model)

Hi Apple changed the security model in macOSX 10.11 El Capitan. While 10.11 is still in public beta, it is unlikely that the security model will be in any release of the latter.

This means that, for example, the / usr / bin directory is no longer accessible (not even with root), so all software paths that reference this directory no longer work. For example MacTex or R.

MacTex noticed this problem and listed one on their website:

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

MacTeX installs four GUI applications: BibDesk, LaTeXiT, TeX Live Utility, and TeXShop. Many users have other GUIs and utilities. All of these programs are currently configured to look for binaries in / usr / texbin. Over the summer, users must reconfigure their graphical applications to use / Library / TeX / texbin. They won't notice any change. This refinancing will be mandatory upon the release of El Capitan.

Now I wonder how we can change the $ PATH variable for R to work in a terminal (bash) again in OSX 10.11.? I couldn't find any help on how to do this. At this point, typing R in the terminal brings up the following error message, although R is successfully installed: R: command not found

+3


source to share


2 answers


While / usr does not work, / usr / local and / usr / local / libexec are available and should be used instead for third party binaries.

Apple has stated that for the final (GM) release of 10.11, that any third-party applications that are present in system folders (such as / usr) during the El Capitan installation may be moved by the installer. I suspect they will be moved to / usr / local.



Developers must update their software to work with security and paths.

If the R command is not found, find the binary and update the $ PATH variable .

0


source


There are two options:



  • update Tex for example. MacTex-2015 https://www.tug.org/mactex/ which should (haven't tried yet) fix the paths for you

  • update the paths themselves from the terminal window:

    • First you need to create a standard (and short place):
      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 variable PATH

      :
      sudo sed -i -e "s/usr/Library\/TeX/" /etc/paths.d/TeX

    Or you can do in one (maybe not smart) line:

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

0


source







All Articles