Installing R on linux (centos)

1

I need to install R on centos linux to an upgraded version.

Currently we have 2.10 which I compiled from source but the server admin is asking me to move the install to /programs instead of /home/me which is fine with me....

Should I uninstall R (and How) and then install to /programs?

user1284181

Posted 2012-03-21T18:30:39.203

Reputation:

sounds like a windows-only administrator man. there is no '/programs' by default in linux. maybe he would say '/usr/bin' if he knew linux. – conspiritech – 2012-03-21T20:44:41.643

Answers

0

If you have the compiled binary, you can ask the admin to move it to /programs for you, but then it will be static and require a new compile/install each time etc.

This is what package management tools were invented for, so.....

I would recommend instead asking the admin to install using yum (rpm) and have that manage the versions for you. There are R packages available for CentOS, so this should be trivial for the sysadmin in question (sudo yum install R). If it should then be linked from the default install location to /programs, then that is what symbolic links are for :)

Edit: since you can't install via RPM, then to save yourself having to download, compile from source and re-install to /programs every time, you could download the rpm package (google for centos R rpm packages) and then follow the instructions here:

http://www.linuxquestions.org/questions/programming-9/how-to-extract-binary-or-what-ever-files-from-rpm-package-659712/

That will allow you to extract the binary and copy it to /programs - hopefully save you some time.

Adam C

Posted 2012-03-21T18:30:39.203

Reputation: 2 475

Hey thanks. We can't use rpm or yum (through godaddy or someone i never heard of). They don't like symbolic links and I'm cool with that... What do you mean it will be static and require a compile / install each time.... Sorry : ( I'm a noob. – None – 2012-03-21T18:44:04.963

I updated the answer to reflect your situation. Essentially what you have to do is either compile from source each time you want to upgrade (as you have done in your home folder), or you can follow my other suggestions above. Once you have a working binary via either method, you just need to add it to /programs and set the appropriate permissions (note: you have to have permissions sufficient to write to /programs to do this). The server admin will be able to tell you how to get binaries into /programs if not (or there may be docs explaining it for your provider) – Adam C – 2012-03-21T19:03:47.297