installed directory not writable, cannot update packages 'boot', 'class', 'KernSmooth', 'mgcv', 'nnet', 'rpart', 'spatial'

前端 未结 3 575
醉话见心
醉话见心 2021-01-02 10:35

I installed the Bioconductor packages on R version 3.1.2 on Ubuntu 14.04 and received the message below:

The downloaded source packages are in ‘/t

相关标签:
3条回答
  • 2021-01-02 11:06

    I faced the same problem working in R-studio. The solution is to give root access to R.

    In Windows, that means you need to run the program as an Administrator.

    In Unix/Linux, you should launch R from the terminal by doing sudo R.

    Then, once you're running with sufficient privileges, you can try installing your package and it should work.

    0 讨论(0)
  • 2021-01-02 11:06

    The warning means that there are more recent versions of the listed packages available, but your version cannot be updated because the directory in which the packages are installed cannot be written to. Usually this means that R was installed with 'system administrator' privileges, but that you are trying to update packages as a regular user.

    The consequence is that the features or bug fixes implemented in the updated packages are not available to you. The specific consequences could range from minor typographical corrections on a man page through serious bug fixes. Qualitatively, my bet is that it 'does not matter' for most uses.

    The solution is to update these packages when running R as a user with permission to write to packages in the installed directories -- typically the last element of the output of .libPaths(), or more fine-grained via installed.packages()[, "LibPath"]

    0 讨论(0)
  • 2021-01-02 11:20

    I faced the same problem today when installing three Bioconductor packages under Windows. Two (dependencies of the package I really wanted) were already on my system in newer forms (as described in @Martin-Morgan solution) and so no action was necessary. However, one was not installed. For this, third package, I had success in doing an installation from the local file that was downloaded during the failed install without having to escalate privileges (which was my next step as outlined by @Ninadmw).

    In R, go to the menu Packages/Install Package(s) from local files and navigate to the local download directory listed, which in your case was /tmp/RtmpZYw0Qp/downloaded_packages, and select the package you want to install.

    In RStudio (which you should use), go to the menu Tools\Install Packages, change the install from field to Package Archive File (.zip; .tar.gz), use Browse... to navigate to the listed download directory, which in your case was /tmp/RtmpZYw0Qp/downloaded_packages and select the package you want to install. Then click on the Install button.

    0 讨论(0)
提交回复
热议问题