Offline installation of a list of packages: getting dependencies in order

后端 未结 1 1460
误落风尘
误落风尘 2021-02-02 00:29

I\'ve got the source files for a bunch of packages and their dependencies that I want to install on computers that have no internet access. I want to install all of these on oth

相关标签:
1条回答
  • 2021-02-02 00:54

    The package miniCRAN can help with this. You tell miniCRAN the list of packages you would ever want to install, it then figures out the dependencies, downloads those packages and creates a repository on your local machine that behaves like CRAN, i.e. it respects install.packages() etc.

    More information:

    • Available on CRAN

    • Read the vignette

    • We are actively developing miniCRAN. Track progress and find the latest development version at github miniCRAN repository

    • See the project wiki for links to presentations, blog posts and more

    To install from the local miniCRAN repository, you have two options.

    1. Firstly, you can use the URI convention file:///. e.g.

      install.packages("ggplot2", repos="file:///path/to/file/")
      
    2. Alternatively, you can configure the destination as an HTTP server and make your repository available via a URL. In this case, your local repository will look and feel exactly like a CRAN mirror, other than it only contains your desired packages.

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