[R-SIG-Mac] Multiple R versions: set Current via symbolic link: permissions?

Kasper Daniel Hansen kasperdanielhansen at gmail.com
Tue Oct 11 16:34:06 CEST 2011


Marius,

Note that this will _not_ make it possible to run the different R
versions simultaneously.

Kasper

On Tue, Oct 11, 2011 at 10:19 AM, Simon Urbanek
<simon.urbanek at r-project.org> wrote:
>
> On Oct 11, 2011, at 6:24 AM, Marius Hofert wrote:
>
>> Hi,
>>
>> I have multiple R versions installed and would like to switch between them via setting the symblic link "Current". To make this a bit more convenient, I defined two "aliases" in .bashrc:
>>
>> alias R2.13='d=/Library/Frameworks/R.framework/Versions; rm $d/Current; ln -s $d/2.13 $d/Current'
>> alias R2.14='d=/Library/Frameworks/R.framework/Versions; rm $d/Current; ln -s $d/2.14 $d/Current'
>>
>
> Try
>
> ln -sfn 2.13 /Library/Frameworks/R.framework/Versions/Current
>
> You'll need to be admin of the computer, otherwise you'll need sudo or change permissions. Note that for symlinks you'll need extra -h in chown otherwise you're changing ownership of the target not the link. If in doubt (ie., you messed with permissions before), run sudo chmod g+w -R /Library/Frameworks/R.framework
>
> Cheers,
> Simon
>
>
>> On executing R2.13 in the terminal, I get:
>> rm: /Library/Frameworks/R.framework/Versions/Current: Permission denied
>> ln: /Library/Frameworks/R.framework/Versions/Current/2.13: Permission denied
>>
>> If I chown Current, I still get:
>> rm: /Library/Frameworks/R.framework/Versions/Current: Permission denied
>>
>> I (bad) solution is to put in "sudo" in the alias...
>>
>> How is it done correctly?
>>
>> Cheers,
>>
>> Marius
>>
>> PS: I also posted it for future reference, I've only found the idea of using ln -s on the help pages/FAQ, but not how to get around the permission issue.
>> _______________________________________________
>> R-SIG-Mac mailing list
>> R-SIG-Mac at r-project.org
>> https://stat.ethz.ch/mailman/listinfo/r-sig-mac
>>
>>
>
> _______________________________________________
> R-SIG-Mac mailing list
> R-SIG-Mac at r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-mac
>



More information about the R-SIG-Mac mailing list