Updating packages in system library on the AWS Rstudio server

I am using a Rstudio server AMI maintained by Louis Aslett. As it happens, several packages in the system library have to be updates. However, since I don't have a permission to the system library, I get this error message, "Installation path not writeable, unable to update packages." I could move all those packages to my user library and update but I am wondering if there is any way to get around this permission issue. I would appreciate any pointers.

Thanks.

1 Like

If your user has sudo rights, you can run this command on the terminal pane

sudo su - -c "R -e \"update.packages(repos='http://cran.rstudio.com/', ask=FALSE, checkBuilt=TRUE)\""

@andresrcs, thanks for the command. One quick question regarding "- -c". I can see "su -c" but what does "su - -c" do ? Also,I can use "sudo - i" instead of sudo su" ?

Thanks.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.