I handle SysAdmin for a multi-user Linux box, with R 2.7.1 compiled and installed to make usee of ACML (Opteron chips). The library files (packages) are installed to /usr/local/lib64/R/library Everything works as it should, except for the following. Say I have a user (an R developer) who has developed a package called Blaster. We'll call the user guru. Now, /home/guru/Blaster, contains the needed directory structure to do a normal install (i.e., R CMD INSTALL Blaster), but the user can't write to /usr/local/lib64/R/library. Sure, said user can do a local install, so *he* can use Blaster, but we'd like it so that changes guru makes to Blaster are available to everyone. My first simple-minded solution to this was to simply create a symbolic link to Blaster from within /usr/local/lib64/R/library. However, this doesn't seem to work. Invoking library(Blaster) gives an error message about Blaster not being a valid library. Apparently, R CMD INSTALL Blaster does something more than simply copy Blaster to the appropriate directory. I did a quick perusual of what I could find online, but I suspect I've missed something - hopefully not too embarassingly obvious. Basically, what I'd like to do is create a symbolic link to 'something' that guru creates, from within /usr/local/lib64/R/library, such that (i) Blaster is available to all users on the system, and (ii) any changes Guru makes to his code are automatically available. Is anything like this feasible? [[alternative HTML version deleted]]
It seems not the whole path /home/guru/Blaster is accessible to the intended users. Since guru has read access to the R install dirs why don't you try putting real Blaster dir there and giving guru the ownership or at least necessary permissions so that (s)he can really actually install Blaster there? Just a thought Regards Latchezar> -----Original Message----- > From: r-devel-bounces at r-project.org > [mailto:r-devel-bounces at r-project.org] On Behalf Of egc > Sent: Thursday, July 17, 2008 9:17 PM > To: r-devel at r-project.org > Subject: [Rd] symbolic linking to library files > > I handle SysAdmin for a multi-user Linux box, with R 2.7.1 > compiled and installed to make usee of ACML (Opteron chips). > The library files (packages) are installed to > /usr/local/lib64/R/library > > Everything works as it should, except for the following. Say > I have a user (an R developer) who has developed a package > called Blaster. We'll call the user guru. Now, > /home/guru/Blaster, contains the needed directory structure > to do a normal install (i.e., R CMD INSTALL Blaster), but the > user can't write to /usr/local/lib64/R/library. Sure, said > user can do a local install, so *he* can use Blaster, but > we'd like it so that changes guru makes to Blaster are > available to everyone. > > My first simple-minded solution to this was to simply create > a symbolic link to Blaster from within > /usr/local/lib64/R/library. However, this doesn't seem to > work. Invoking library(Blaster) gives an error message about > Blaster not being a valid library. > > Apparently, R CMD INSTALL Blaster does something more than > simply copy Blaster to the appropriate directory. I did a > quick perusual of what I could find online, but I suspect > I've missed something - hopefully not too embarassingly obvious. > > Basically, what I'd like to do is create a symbolic link to > 'something' that guru creates, from within > /usr/local/lib64/R/library, such that (i) Blaster is > available to all users on the system, and (ii) any changes > Guru makes to his code are automatically available. Is > anything like this feasible? > > [[alternative HTML version deleted]] > > ______________________________________________ > R-devel at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-devel >
I agree with the other poster's advice to just give guru permission to write to the R library folder. But the thing you want is the following. Create a directory somewhere that guru has write permission, for example ~guru/library (although I guess I would recommend somewhere else than guru's home directory) and do an R CMD INSTALL into that directory, for example by R CMD INSTALL Blaster -l ~guru/library You can make this directory accessible for all your users by altering site.profile to contain for example .libPaths("~guru/library") or by creating an environment variable for all users (how you do that can probably be accomplished in many ways), like export R_LIBS=/home/guru/library That should be enough to get you started. Kasper On Jul 17, 2008, at 6:16 PM, egc wrote:> I handle SysAdmin for a multi-user Linux box, with R 2.7.1 compiled > and > installed to make usee of ACML (Opteron chips). The library files > (packages) > are installed to /usr/local/lib64/R/library > > Everything works as it should, except for the following. Say I have > a user > (an R developer) who has developed a package called Blaster. We'll > call the > user guru. Now, /home/guru/Blaster, contains the needed directory > structure > to do a normal install (i.e., R CMD INSTALL Blaster), but the user > can't > write to /usr/local/lib64/R/library. Sure, said user can do a local > install, > so *he* can use Blaster, but we'd like it so that changes guru makes > to > Blaster are available to everyone. > > My first simple-minded solution to this was to simply create a > symbolic link > to Blaster from within /usr/local/lib64/R/library. However, this > doesn't > seem to work. Invoking library(Blaster) gives an error message about > Blaster > not being a valid library. > > Apparently, R CMD INSTALL Blaster does something more than simply copy > Blaster to the appropriate directory. I did a quick perusual of what > I could > find online, but I suspect I've missed something - hopefully not too > embarassingly obvious. > > Basically, what I'd like to do is create a symbolic link to > 'something' that > guru creates, from within /usr/local/lib64/R/library, such that (i) > Blaster > is available to all users on the system, and (ii) any changes Guru > makes to > his code are automatically available. Is anything like this feasible? > > [[alternative HTML version deleted]] > > ______________________________________________ > R-devel at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-devel