R package installation

installation, r

Solution

A few comments to your questions:

- Look at `help(Startup)`. You are probably running `$R_HOME/etc/Rprofile` [ which on Ubuntu and Debian is also available as `/etc/R/Rprofile` as we created softlinks to connect them ] and you have both an empty `$R_HOME/etc/Rprofile.site` as well as `~/.Rprofile` to play with.

- For starters, do `ls -l` on the lockfile and see it is there. If so, and if you have no other R process running, remove. Re-start the package install.

- RODBC needs development headers for an ODBC library and all that -- again, for Debian / Ubuntu you just say `sudo apt-get install r-cran-rodbc`. If you run another distro, see if they have RODBC prepackaged.

- Regarding `~/.Rprofile` there are few possible tips and tricks you can learn from this earlier StackOverflow question.

Problem

I have basically two questions. How do I locate the default `Rprofile` which is running? I have not setup a `Rprofile` yet, so I am not sure where it is running from. I am trying to install a few packages using the command (after doing a SUDO in the main terminal). ``` install.packages("RODBC","/home/rama/R/i486-pc-linux-gnu-library/2.9") ``` and I get back an error which says: ERROR: failed to lock directory ‘/home/rama/R/i486-pc-linux-gnu-library/2.9’ for modifying Try removing ‘/home/rama/R/i486-pc-linux-gnu-library/2.9/00LOCK’ The downloaded packages are in ‘/tmp/RtmpkzDMVU/downloaded_packages’ Warning message: In install.packages("RODBC", "/home/rama/R/i486-pc-linux-gnu-library/2.9") : installation of package 'RODBC' had non-zero exit status

Original source

Related problems