[R-SIG-Mac] /usr/local/bin not writable

Simon Urbanek @|mon@urb@nek @end|ng |rom R-project@org
Wed Feb 16 23:55:40 CET 2022


Göran,

the PATH is inherited from your shell when you start R in the shell. However, when you are running in R.app then you are typically not starting it from the shell but via the launcher, so only system defaults are used. I would probably just use .Rprofile instead since you can't easily use shell expansion in .Renviron in R.app.

Cheers,
Simon


> On 17/02/2022, at 11:42 AM, Göran Broström <goran.brostrom using umu.se> wrote:
> 
> Simon,
> 
> thanks for your advice which I followed and it works (of course). My next step was to install pandoc so I could write pdf reports. I did it with the aid of homebrew  and got it in /opt/homebrew/bin/, which is in my PATH. My Makefile is
> 
> R_OPTS=--no-save --no-restore --no-init-file --no-site-file
> 
> paper4.pdf: paper4.Rmd
> 	R ${R_OPTS} -e "rmarkdown::render('paper4.Rmd')"
> 	pdflatex paper4.tex
> 
> and this makes fine. However (and this is my question), running it from inside Rapp:
> 
> > rmarkdown::render('paper4.Rmd')
> 
> gives me "Error: pandoc version 1.12.3 or higher is required and was not found". (My version is 2.17.1.1)
> 
> > system("echo $PATH") indeed shows that /opt/homebrew/bin is missing,
> 
> but issuing 'echo $PATH' at the command line gives a much longer PATH including /opt/homebrew/bin and ~/Library/TinyTeX/...
> 
> Do I have to set PATH in .Renviron? I have set the PATH in .zshrc
> 
> Thanks again!
> 
> Göran
> 
> PS. No such problems on my ubuntu machine.
> 
> On 2022-02-15 23:23, Simon Urbanek wrote:
>> Göran,
>> you can pretty much ignore that warning. It is failing at the end when it attempts to create convenience symlinks. Tinytex installs into ~/Library/TinyTeX so you just have to make sure it is on your PATH:
>>  export PATH=~/Library/TinyTeX/bin/universal-darwin/:$PATH
>> Unfortunately Yihui's instructions (to change /usrlocal/bin ownership to you) are somewhat dangerous and asocial, because they instruct you to symlink your local copy from your home to the system which is really bad idea if you are not the only user on the machine as it will prevent everyone else form using TeX. If you really want to do that (ie. there is no other user on the machine) then you can simply use
>> sudo tlmgr path add
>> instead or if you didn't set the PATH before with
>> sudo ~/Library/TinyTeX/bin/universal-darwin/tlmgr path add
>> Again, I wouldn't recommend that. A better way would be to pick a global location such as /Library/TinyTeX instead if you want to install it for all users and then run sudo /Library/TinyTeX/bin/universal-darwin/tlmgr.
>> Cheers,
>> Simon
>>> On Feb 16, 2022, at 11:03 AM, Göran Broström <goran.brostrom using umu.se> wrote:
>>> 
>>> Hello M1 experts,
>>> 
>>> I have just become a happy owner of a MacBook Pro M1 Max (very impressed so far). Installing Rgui was a piece of cake, and installing the packages I want also went smoothly. Until I tried 'tinytex'. Gave me the message in the Subject line, with a recommendation: "make it writable". I, however, vaguely remember a recommendation about not touching /usr/local/, so what do you recommend?
>>> 
>>> There is also the question of whether it might be better to install a full TeX distribution (texlive) on this machine (I mean for R purposes, of course). Any suggestions?
>>> 
>>> Thanks!
>>> 
>>> Göran Broström
>>> 
>>> _______________________________________________
>>> R-SIG-Mac mailing list
>>> R-SIG-Mac using r-project.org
>>> https://stat.ethz.ch/mailman/listinfo/r-sig-mac
>>> 
> 



More information about the R-SIG-Mac mailing list